Sending A large attachment using the Microsoft Graph API

0
I have a big file that needs to be uploaded to azure. I've been using: https://learn.microsoft.com/en-us/graph/api/attachment-createuploadsession?view=graph-rest-1.0&tabs=http their API to Create a draft e, upload session. But I need to split the file into chunks of binary data to sent them into put requests on the session. i've tried using base64 but this does not work. Is there a way to send the binary content of splitfile via put requests?
asked
1 answers
0

Hello Luuk,

Do not use the base64 string. When you send the file contents as is, it should work.

Headers -

1. Content-Type : 'application/octet-stream'

2. Content-Range : 'bytes 0-{content byte}' (you will need to calculate the content range)

In the Request, pass the file as - "$FileDocument/Contents"

Hope this helps.

Regards,

Niraj

answered