Sending A large attachment using the Microsoft Graph API

I have a big file that needs to be uploaded to azure. I've been using: 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?
1 answers

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.