Uploading files larger than 262 MB via REST API #8757
Unanswered
SteveScott
asked this question in
Q&A
Replies: 1 comment
-
The docs should be changed from Max size 2 GB to max size 262.1 MB |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I upload large files to SharePoint, I get the following error.
The request message is too big. The server does not allow messages larger than 262144000 bytes."}}}'}
So I am trying to load chunked uploads with the
startUpload()
,continueUpload()
, andfinishUpload()
endpoints as specified in numerous documentations.f"{url}/_api/web/getfilebyserverrelativeurl('{file_url}')/startupload(uploadID=guid'{upload_id}')"
However, to start an upload the file must already exist on the system. So I add an empty file first.
f"{url}/_api/web/getfolderbyserverrelativeurl('{sharepoint_folder_long}')/files/add(overwrite=true, url='{filename}'"
But when I call startupload after that, I get the error message:
{'500, {"error":{"code":"-1, Microsoft.FileStore.ErrorExceptionTag","message":{"lang":"en-US","value":"Error=Value=CannotAddDataNonContiguousData, Tag=0x2341f460"}}}'}
This error message does not exist on the internet!
Somehow I need to tell startUpload to overwrite the existing placeholder data.
Beta Was this translation helpful? Give feedback.
All reactions