Can I use Autodesk viewing API to render local DWG (2D) files to my browser? - api

The main goal of my project is to read Autocad(DWG) drawings from my local server to output them in a web browser (Chrome).
I managed to do it with the View and Data API in JAVA from Autocad with buckets, Key, etc. but when it comes to read offline files with this sample code from https://github.com/Developer-Autodesk/view-and-data-offline-sample, the DWG format did not work.
Do you have suggestion or have a clue to use the offline API with DWG files?

The Autodesk View & Data API (developer.autodesk.com) allows you to display a DWG on your website using a zero-client (WebGL) viewer. You need to upload the DWG to the Autodesk server, translate it, and either then download the translation to store on your local server (as demonstrated on extract.autodesk.io) or keep it on the Autodesk server. You might consider downloading it to be advantageous because then you don't need to implement the OAuth code on your server.
Buckets on the Autodesk server can only be accessed using the accesstoken created from your API keys, so it is secure in that only someone with your accesstoken and who knows the URN can access your translated file. However, for the viewer on your client-page to access the file, you need to provide it with your accesstoken. This does mean that someone could separately access your translated file by grabbing the accesstoken and URN from your webpage. But if you're serving up the model on a public page, then you presumably don't care about that.
There is a 'list' API available, but this is white-listed (available on request), so getting your accesstoken and urn for one file doesn't automatically give access to your other files - unless someone can guess the other filenames (or iterate to find them).
If you use a non-permanent bucket, then your original (untranslated file) becomes unavailable when the bucket expires, or you can explicitly delete the untranslated file (using the delete API).
Files translated via the View & Data API are not accessible via A360. They are stored in a separate area. (But I wouldn't be at all surprised if an A360 file access API became available in the near future :-).
Finally, unless you want to interact with the displayed file via the viewer's JavaScript API, you may prefer just to upload your files to A360, share the translated model, and then iframe embed them in your webpage.

Related

Can we use SDKs directly in Suitelet?

Implementing a requirement to store images in AWS bucket instead of NetSuite. Since the bucket is private, I have to upload and generate the URL in backend/suitelet.
I tried to include AWS SDK into Suitelet by defining, but that doesn't work.
I want to get to know whether can we use/include SDKs inside Suitelet?
How can I implement a solution for this without using any third party solutions?
How are permissions for the links managed? Can you make them publicly viewable? Remember unless the links you generate are timestamped anyone with the link can get to the image.
In terms of uploading the images check out https://github.com/DeepChannel/netsuite-savedsearch-s3
If you need to keep have each image have a magic link you could use a Heroku app or an AWS lambda. The app would check a hash based on link parameters and proxy the image if the hash is valid. If your images are supposed to be private to a customer this would be the way to go.
If you are using the images generally on a website then just make the bucket publicly readable and use the API to upload.

How to store images for mobile development

I decided to use back4app for easily creating my backend and for having a built in hosting solution.
I'm quite a newbie with this tool so my question will seem "simple":
I was wondering how will I store the images of my mobile application. As far as I know they use AWS so I thought the service would provide like an interface to upload some images to a S3 bucket...
Should I create a personal bucket or does the service offer that kind of feature ?
The idea is to store then the absolute url of the image in my model. For example each Class has a cover field of type string.
you're right, Back4App use AWS.
Back4App prepared the Backend for you, for example, if you try to save a file direct at your Parse Dashboard, you will can access the image and you already have a absolute URL.You can configure the column with a type File, like below:
Add a column with the File type
After upload a file, you will can access click at the box :)
After that upload the file

office 365 api generate a guest link for MyFiles

I am trying to access from an MVC application, the OneDrive files from my office 365 account.
What I need is to give my application user the possibility to edit a .docx file, in their browser.
I used Office 365 APIs Preview, to get the list of files, and their properties, but I don't know how to allow the user to edit that file in his browser.
A solution to this problem could be to share the file with different user of my application, by creating a guest link.
From the office365 portal this is a simple task:
- OneDrive, select the file -> manage -> share with -> get a link, the link can have read only or read write rights.
I don’t know how to create this link from the APIs.
Can you please tell me how can I generate this guest link or if there is a different solution to this problem.
In short, I don't think this can be done in a supported way.
There is a real risk that if you figure out the URL structure, that the structure could change. I suggest that you make a feature request by using UserVoice. It would be preferable that the REST API and the client objects construct this URL for you.
With that said, if you take the sharing link, and place it into a browser window, the link will redirect to Word Online with the document in the browser. Take a look at the structure of the URL in the Word Online browser window. You could use that as a template, and along with the information from the File.Url property from the Office 365 API Preview, you may be able to put together a URL to that file. Expect that this approach would not be supported and would be subject to URL structure changes.
If other people find that this would be a useful feature, please use UserVoice to let us know.

Set client_mtime metadata via dropbox API

I'd like to be able to set the client_mtime in the dropbox file metadata. In the dropbox api docs it states
client_mtime For files, this is the modification time set by the
desktop client when the file was added to Dropbox, in the standard
date format. Since this time is not verified (the Dropbox server
stores whatever the desktop client sends up), this should only be used
for display purposes (such as sorting) and not, for example, to
determine if a file has changed or no
I'd like to be able to set this via the API. It clearly is possible to set because the desktop client does it but I can't find a documented way.
Is there a way to set this?
Replying to my own question a couple of years later...
The Dropbox v2 API does allow you to set client_modified when you upload a file now.
You don't appear to be able to change it without uploading the file again though.
[This answer is out of date. The Dropbox API v2 supports setting the modified time.]
This can't be explicitly set via the API, though it does get updated to the current time when you upload a file via the API.

Upload large file on server is this possible by create firefox addon

I want to upload large video file. for that i want to create firefox addon. Is this possible by create firefox addons to upload large files on my server.
or is there any other way to upload large files on server.
please suggest.
If you are POSTing the data to the server as application/x-www-form-urlencoded then you should base64 encode it using btoa() and include it as one of the POST parameters in the request body (i.e. the string passed to XMLHttpRequest.send()):
postbody = "body=" + btoa(fileContents);
xhr.send(postbody);
If you are just downloading the file and uploading it right away, you might as well keep it in memory since you're presumably going to load it into memory anyway in order to base64 encode the contents.
Well if you're reading the file into memory then you should need an nsIFile at all. You can just download it using XMLHttpRequest and use responseText, uploading it in the way I described in the answer. If you do have an nsIFile then yes, that snippet describes how to read from it.
I assume you are wanting to upload via HTTP.
If so, the upload limit is usually decided by the server-side software. This affects both the maximum size and the length of time you have to upload it.
Without a server capable of taking an upload in chunks and reassembling it, you are limited in ways you can't get around through software.
If you want to upload via FTP on the other hand, there are a lot of options... look at FireFTP.
I have made firefox addons for fileupload.
I integrate jquery file upload.
I create widget. In the widget I made panel. In panel I create separate web page for file uploading. And panel is calling that page.
For more information you can mail me at chetansinghal1988#gmail.com