I am working on uploading certain files to SharePoint Document Library using Microsoft Graph SDK for PowerShell. From the documentation, I understand that there are two ways to do that - either through a single API call or by creating an upload session for larger files. This is where the confusion lies.
If I use the a single API call endpoint (given below), what's the maximum limit for the file size that can be uploaded?
PUT /drives/{drive-id}/items/{parent-id}:/{filename}:/content
Because two documents, given below, mention two different limits. One mentions 250mb (more recently edited) and the other mentions 4mb. They both mention different limits for the same endpoints with the same purpose - upload a new file or update an existing file in OneDrive or SharePoint Document Library. What is the correct size limit that one should consider?
- (250mb) https://learn.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http
- (4mb) https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_put_content?view=odsp-graph-online
Any help on this would be highly appreciated. Also, I use this command to upload files via PowerShell Set-MgDriveItemContent (https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.files/set-mgdriveitemcontent?view=graph-powershell-1.0)
Thanks