Upload large files via REST

Hi,

Following this thread, https://community.m-files.com/forums-1552881334/f/m-files-api/7498/upload-large-file-rest-api, I've been looking at these 'undocumented' endpoints.

I'm able to call the methods for the upload (including 2 chunk-methods), but the commit-call failes.

Call1 - OK: REST/files/upload.aspx

Call2 - OK: REST/files/upload/1.aspx?resumableChunkNumber=1&resumableTotalChunks=2&resumableChunkSize=2097152

Call3 - OK: REST/files/upload/1.aspx?resumableChunkNumber=2&resumableTotalChunks=2&resumableChunkSize=2097152

Call4 - Error500: REST/files/15/2821414/uploadtemporarycommit.aspx

{"ErrorCode":"278531","Status":500,"URL":"/files/5/209715200/uploadtemporarycommit","Method":"POST","Exception":{"Name":"COMException","Message":"Invalid pointer.","InnerException":{"Name":"MFilesException","Message":"Invalid pointer.","StackText":"Error reference ID: 7de22409-5a18-4726-9495-7252cdd2b7c1","ErrorCode":"278531"}},"Stack":"Error reference ID: 7de22409-5a18-4726-9495-7252cdd2b7c1","Message":"Invalid pointer.","IsLoggedToVault":true,"IsLoggedToApplication":true,"ExceptionName":"COMException"}

Do I need to conclude these methods no longer work? Or am I missing out on something?

  • Update:

    After some testing I saw stopping at call 3 and providing this upload to the object, seems to have the desired effect. 

    Once the object is updated, and then calling the commit-method, even results in the message:

    "Not found. (The specified upload session # does not exist.)"

    But can any confirmation be given on if this is the correct way? And wherefore is the commit-method needed? What if I don't call this method.... will the temporary file-sessions be cleared eventually (like with normal uploads)?