Obtaining binary data size to send in upload session with Sharepoint Graph API

Hi @messi198310, it sounds like you might need to upload the files in chunks rather than in a single request which wouldn’t work through the HTTP Request node at the moment unfortunately.

However, if all you need is the size of a binary file in bytes, you could read it for example like so (simply replace data with whatever your binary property is called):

Example Workflow

File size returned by the workflow vs dir:
image

Should chunked uploads be needed, you might be able to write custom code in order to manually split up binary data and then perform as many requests as needed, but I am afraid I don’t have any experience with this and no great pointer as to where to start here. A basic example of how to manually upload a (whole) file in the Function node can be found here:

You might also want to raise support for chunked uploads as a feature request in this case as I imagine this might be useful for quite a few other cases.

1 Like