In order to upload a large file via the MSGraph DriveItems REST API we need to send a custom header (Content-Range) with a PUT request.
During the getAuthorizationHeader function the headers passed with the AxiosConfig object get erased by an initialization.
Problem explanation
In order to upload a large file via the MSGraph DriveItems REST API we need to send a custom header (Content-Range) with a PUT request. During the getAuthorizationHeader function the headers passed with the AxiosConfig object get erased by an initialization.
Code which exposes the problem
Microsoft Graph DriveItems doc for context https://docs.microsoft.com/it-it/onedrive/developer/rest-api/api/driveitem_createuploadsession?view=odsp-graph-online#upload-bytes-to-the-upload-session