[Microsoft Graph Connector] How to upload large file via MS Graph
Forge component by Daniel Filipe

If upload file is larger than 4MB, it should make use of 'uploadsession'. Hence, I have tried to create upload session REST API like

"POST /drives/{driveId}/items/{itemId}/createUploadSession"

Then, i obtain the response 

  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.uploadSession",
  "expirationDateTime": "2020-05-05T09:37:39.305Z",
  "nextExpectedRanges": [
  "uploadUrl": "https://xxx-my.sharepoint.com/personal/xx_yy/_api/v2.0/drives/b!ZA9jOhraNEyKmsCKkM2FPj8Q60_TvDlKsJPxboif87cpEElSBSwqT5ruGh7C7RCf/items/01XOXUBIJASN7PM6AUC5B2TB3QYTO4OS7E/uploadSession?guid='a5dee327-90b6-4128-b5c4-bd98b7c7702a'&path='~tmp7E_temp.txt'&overwrite=False&rename=True&dc=0&tempauth=eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAva2luZXRpeHN5c3RlbXMtbXkuc2hhcmVwb2ludC5jb21AZTIyNDE4NDctNDZlMC00OGJhLWFlM2UtMWU3ZGMzMDFkMTkyIi...."

After that, how can i upload bytes to this upload session link "uploadurl" ?

I have tried to upload by

PUT {uploadUrl}

Unfortunately, the failure result i got.

Please advise.


I am working on the same issue  now. Did you find a solution? 




This document describes the process in detail. 




may i know how to break down the file into pieces in order that it is below 60MB for uploading?

In postman, it is easy to break down the file in bytes...but i don't know how to split it in outsystems. any forge can be used?

As far as I know there isn't any at the moment. However, I have created one myself for such a purpose. I will try to upload in to the Forge today and send you a link. 

Oh ,great. I am trying to work that out as well :)

I have uploaded the component to the Forge. I use this myself to get a certain part of a binary blob for upload purposes. I also have an component in the works that will solve this entire question but I'm nowhere near of publishing that (and I have no ETA) so for now you need to implement this yourself.

Link: https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=10644




I am working on the upload stuff. I will let you know when I manage to fix it :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.