Hi all
I’m after some assistance with uploading files via GraphAPI, and hoping someone can help, as I can’t get past the “The Content-Range header is missing or malformed.” error….
So, the context…
I made a MSForm for one of the other departments to get requests – nothing fancy, just some questions and a file upload option. As I made the Form, the uploaded files get saved to my OneDrive. I’m now trying to create a Flow that completes various actions (after a Form is received); one of these, is to save the uploaded file(s) into the SharePoint library behind a Team that they use.
However, I won’t be a member of the Team after this is setup (so I can't use the standard save to sharepoint connectors), and I can’t guarantee who will be going forward (so don’t want to export and import on another account), so I’m trying to use Graph.
Also, the file may be quite sizeable, so I’m trying to cover all the bases and uploading as chunks.
I’ve been referring to the information here;
driveItem: createUploadSession
But the example is very vague….it doesn’t properly tell me how to actually upload the file.
My Flow seems to get the driveItem and create the upload session successfully, and I’ve got it picking out the Start and End bytes for the Content-Range….but it constantly tells me is missing or malformed….




Content-Range @concat('bytes ',variables('StartBytes'),'-',sub(variables('EndBytes'),1),'/',variables('FileSize'))
Content-Length (sub(variables('EndBytes'),variables('StartBytes')))

Hoping someone can maybe tell me where I've gone wrong.
Thanks, Chris