fkalis / bash-onedrive-upload

Upload files to onedrive via linux command line
MIT License
308 stars 72 forks source link

Decommisioned Discovery Service REST API for OneDrive for Business. #79

Open snovak7 opened 4 years ago

snovak7 commented 4 years ago

Upload for a One Drive for Business relies on this API for a URL discovery.

https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/discovery-service-rest-operations

This needs update to use graph api for a service discovery.

snovak7 commented 4 years ago

Anyway, the solution is to skip discovery phase and just infuse

function curl_discover_uri() {
        api_uri="https://graph.microsoft.com/v1.0/me"
        api_resource_id="https://graph.microsoft.com"
}
snovak7 commented 4 years ago

Other limitations are also on Graph API, as lower simple file upload (from 100MB to only 4MB)

https://developer.microsoft.com/en-us/office/blogs/attaching-large-files-to-outlook-messages-in-microsoft-graph-preview/

https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_put_content?view=odsp-graph-online

so editing onedriveb.cfg helped with current value

export max_simple_upload_size=4194304