Note: For hosting this sample, you do not need any credentials. But anyone using the sample will need valid credentials for the upload /translation process. Visit the Forge WEB site for instructions to get on-board.
Live demo at
This sample exercises and demonstrates the Autodesk Forge API authorization, and translation process mentioned in the Quick Start guide. It provides you a quick way to get file ready for viewing on your own account without programming.
This sample is dependent of Node.js and few Node.js extensions which would update/install automatically via 'npm'.
Deploy on Heroku
- Download and install Node.js (that will install npm as well)
- Download this repo anywhere you want (the server will need to write files, so make sure you install in a location where you have write permission, at least the 'uploads' folder)
- Execute 'npm install', this command will download and install the required node modules automatically for you.
- You are done for the setup, launch the node server using the command '[sudo] node start.js'.
sudo is required only on OSX and Linux.
[set PORT=<port>] node start.js
sudo [PORT=<port>] node start.js
Note: the port argument can be omitted and default to port 3000. If port 3000 is already in use by another application, you can use any other free port. But in the next section you would need to specify the port to use, i.e. http://localhost[:port]/
Use of the sample
- Start your favorite browser supporting HTML5 and WEBGL and browse to http://localhost:3000/.
Note: In case you use a different port above do not forget to include it in the URL. I.e. http://localhost:8000/.
- Drag'n Drop your files into the 'Drop area' or browse for individual files, That's it.
Or choose one of the proposed sample from the Dropbox and click on teh the 'Translate this one for me'.
- After the translation completed successfully, you can copy the encoded urn string that you can use to view the results, in a html page which supports the Autodesk viewer.
- You are done with translation.