0

I am using web application with forge viewer.When uploading 1GB file in forge viewer its throwing exception.

This error is getting from below line of coding.

 newObject = Await objectsApi.UploadObjectAsync(bucketKey, m_strFileName,
                     Convert.ToInt32(fileStream.BaseStream.Length), fileStream.BaseStream,
                       "application/octet-stream")

Exception message : Error calling UploadObject

at Autodesk.Forge.ObjectsApi.d__57.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Autodesk.Forge.ObjectsApi.d__56.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at CommonGUI.mtequipments.VB$StateMachine_2279_btn_bimfile_Click.MoveNext() in D:\Projects

Could you please help me for this. I need to upload large size files in forge viewer.

1 Answer 1

0

There is a great possibility that the upload has timeouted.

For large model file, please consider using the resumable endpoint PUT buckets/:bucketKey/objects/:objectName/resumable. In C# SDK, it's uploadchunk.

Here is an example: https://github.com/yiskang/ForgeResumableUploadProgressDemo/blob/master/ForgeResumableUploadProgressDemo/Program.cs

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.