Answered by:
How to upload more than 400 MB size file using SharePoint Online rest API?

Question
-
Using below code, I can upload the video file 2 MB is working for me in all browsers.
addFileToFolder(data: any, filename: string) {
let CustomListAssestName: string = this.CustomListAssestName;
var serverRelativeUrlToFolder = "decodedurl='" + <SiteCollectionUrl> + "/" + <LibraryName>+ "'";
var fileuploadEndPoint = this.siteUrl + "/_api/Web/GetFolderByServerRelativePath(" + serverRelativeUrlToFolder + ")/files" + "/add(overwrite=true, url='" + filename + "')"
let headers = new Headers(
{ "accept": "application/json;odata=verbose",
"content-Type": "application/json;odata=verbose" }); // ... Set content type to JSON
let options = new RequestOptions({ headers: headers });
return <Post api call>(fileuploadEndPoint, data.result, options).toPromise();
}But, more than 70MB video file is not working for me in chrome browser. It crash the application. I could not get any response from Post API call.
Using IE browser, I can't upload more than 230 MB video file. I could not get any response from Post API call.
Can you suggest the max upload size for SharePoint Online rest API?
Or any other way to achieve this?
Thursday, December 21, 2017 12:10 PM
Answers
-
Hi,
SharePoint Online has a limitation about uploading files which is larger than 250MB file size using Rest API, the Rest API won't work, and this limitation not only for Rest API, for .NET CSOM, it will have the same limitation.
A workaround is to use the File Chunk to upload larger files in SharePoint Online, you can check the blog below which will fix this issue:
Always use File Chunking to Upload Files > 250 MB to SharePoint Online
Thanks
Best Regards
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com- Proposed as answer by Wendy DZMicrosoft contingent staff Monday, December 25, 2017 1:11 AM
- Marked as answer by Ronika Jency Thursday, February 8, 2018 6:26 AM
Friday, December 22, 2017 8:15 AM
All replies
-
Hi,
SharePoint Online has a limitation about uploading files which is larger than 250MB file size using Rest API, the Rest API won't work, and this limitation not only for Rest API, for .NET CSOM, it will have the same limitation.
A workaround is to use the File Chunk to upload larger files in SharePoint Online, you can check the blog below which will fix this issue:
Always use File Chunking to Upload Files > 250 MB to SharePoint Online
Thanks
Best Regards
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com- Proposed as answer by Wendy DZMicrosoft contingent staff Monday, December 25, 2017 1:11 AM
- Marked as answer by Ronika Jency Thursday, February 8, 2018 6:26 AM
Friday, December 22, 2017 8:15 AM -
Hi,
Thanks for your Answer.
I have used link to upload a large file as a Chunk concept using client side with SharePoint.
- Edited by Ronika Jency Thursday, February 8, 2018 6:37 AM hyperlink set
Thursday, February 8, 2018 6:34 AM