I need to upload a file on OneDrive via API.
As explained here https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createuploadsession?view=odsp-graph-online first of all I create an upload session which allow to upload large files.
After I obtain a temporary upload URL which I then pass to Upload component via prop saveUrl.
Below is my current setup of React component:
<Upload
saveUrl={uploadUrl}
saveHeaders={{
Authorization: `Bearer ${accessToken}`
}}
saveMethod='PUT'
/>
I am getting error The Content-Range header is missing or malformed. and I would like to know how to sent bytes as explained here https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createuploadsession?view=odsp-graph-online#upload-bytes-to-the-upload-session
Thanks