0

We have a 2 legged authorization desktop application for upload 3D models,translate models and view translated model in forge viewer. Recently we are trying to upload a large model (in zip,) which is more than 8GB in size, but failed as before upload completed access token expired.

Our intention is not to change our application rather try to increase access token expire time which is 3599 seconds. We think, if we get 3 times more expire time then we can upload our 8GB model.

Is there any way to increase expire time ? Anyone had this issue before ? How then solved ? Could anyone advice please? Thanks in advance.

Ahasanul
  • 35
  • 2
  • @Petr Broz, related question i posted here https://stackoverflow.com/questions/64078229/unable-to-translate-large-compressed-files-such-as-5gb-and-8gb Could you please check? Thanks! – Ahasanul Sep 26 '20 at 13:36

1 Answers1

0

It is not possible to customize the expiration period of an access token unfortunately. On top of that, trying to upload files of this size in one go could be a very bad experience for your app's users (imagine a drop in the internet connection when you've already uploaded 90% of the file). I would therefore recommend using the resumable upload functionality. That way you can refresh the token when needed, and more importantly, when the upload fails (or is canceled), your app can let the user resume the upload later.

For an example of the resumable upload, here's the implementation of a resumable file upload in the VSCode Forge extension: https://github.com/petrbroz/vscode-forge-tools/blob/develop/src/commands/data-management.ts#L227-L269.

Petr Broz
  • 8,891
  • 2
  • 15
  • 24
  • Thanks @Petr Broz,your feedback convinced us to diagnosis our code. Actually, our code adopted 'resumable upload' already based on this sample,https://forge.autodesk.com/blog/c-resumable-upload-file-forge-sdk without refreshing token. We added code to acquire new token before expire to keep job running. At the end we could upload our two big models,one 5gb zip and other 8gb zip. Now challenge is to translate them in svf format to view in forge viewer. (please see next comment..) – Ahasanul Sep 26 '20 at 09:52
  • (continue from previous comment) Already tried to translate several times for both models but seems same happening, after one hour (3599 sec) it crashes and changes statue to 'The translation job still running: complete. Please try again in a moment'. **Any quick suggestion(s)?** code we adopted from here, https://github.com/Autodesk-Forge/learn.forge.viewmodels/blob/net/forgesample/Controllers/ModelDerivativeController.cs and many models we translated already. No issue for them only they were less then 2gb. – Ahasanul Sep 26 '20 at 09:55
  • Please consider reporting the translation problem to `forge (dot) help (at) autodesk (dot) com` as it may be specific to your design. – Petr Broz Sep 29 '20 at 07:08
  • you are correct. Out of 32 linked files seems 1 have issue.We removed that link file from the model and uploaded model again (which is 7gb), and translation went well only it took 3 hrs!. Now we are checking that issue file. Think we can solve that also. Important is our pressure released ! We thought Forge can't handle such big files but at the end actually we are wrong ! Thanks again for your concern/comments and have a very good day ! – Ahasanul Sep 29 '20 at 07:43