Upload Large Files To OneDrive Using Microsoft Graph API In Python
Вставка
- Опубліковано 10 гру 2024
- In this tutorial, I will cover how to upload large files to OneDrive using Microsoft Graph API in Python.
📑 ms_graph.py Source Code: learndataanaly...
📑 OneDrive Documentation Reference:
docs.microsoft...
📑 OneDrive Upload Large File Documentation:
docs.microsoft...
📺 Getting Started With Microsoft Graph API In Python (Set Up & Authentication):
• Getting Started With M...
📺 How To Create Access Token To Microsoft Graph API In Python:
• How To Create Access T...
📺 How To Save Microsoft Graph API Token In A Token File:
• How To Save Microsoft ...
► Buy Me a Coffee? Your support is much appreciated!
-------------------------------------------------------------------------------------------
☕ Paypal: www.paypal.me/...
☕ Venmo: @Jie-Jenn
💸 Join Robinhood with my link and we'll both get a free stock: bit.ly/3iWr7LC
► Support my channel so I can continue making free contents
---------------------------------------------------------------------------------------------------------------
🌳 Becoming a Patreon supporter: / jiejenn
🛒 By shopping on Amazon → amzn.to/2JkGeMD
📘 Facebook Page → / madeinpython
📘 More tutorial videos on my website → LearnDataAnaly...
✉️ Business Inquiring: UA-cam@LearnDataAnalysis.org
#OneDrive #OneDriveAPI #MicrosoftGraphAPI #MSGraphAPI
Excellent, very good way to teach how to use the API. All work very well. For me, the hard part was create the API on AZURE, my account had a issue with Chrome. Instead I used Edge and work 100%.
I had the same issue with Chrome as well.
I'm a little confused about GRAPH_API_ENDPOINT, how do I get that
Good stuff. Thanks, young man.
When I try to upload the file of size 2.5MB using Postman I get an error like ,
{
"error": {
"code": "invalidRequest",
"message": "The Content-Range header is missing or malformed."
}
}
You may want to use the regular upload function.
ua-cam.com/video/Ok8O_QnrSBI/v-deo.html
@@jiejenn Thanks for the reply. I sorted the issue. But it will be really helpful if we can have this demo or samples in nodejs..
I don't know JavaScript.
Is it possible to do this stuff in async way? I used asyncio + aiohttp and have that error
aiohttp.client_exceptions.ClientResponseError: 416, message='Requested Range Not Satisfiable'
Thanks for useful video! My code stopped in chunk_data = upload.read(chunk_size) with error "ValueError: read of closed file". How can I solve this?
Hi, If possible can you please make a video on creating upload session for attaching large attachments to outlook using ms graph
i need it
Nice explanation. Wondering if the process would be same to upload to a SharePoint folder instead of OneDrive folder.
Thanks for the author's sharing. Watching the author's video on Microsoft Graph api is very helpful to me, and I would like to ask what I should do if I want to upload the whole directory?
maybe my describe not accurate ,i would like say upload a folder
Great one! BTW, would you know the API to create "request file" of a folder in OneDrive for Business?
Not sure what request file is.
@@jiejenn "Request files" link can be generated manually by right-click on a folder and select "request files" option in the context menu. I'd like to know if there's a way to generate this link via Graph API.
Where to get app id?
wonder the same
Does Microsoft Graph API allow download of a file inside a folder?
Of course. The tutorial how to download a file is actually going to be uploaded later today.
great tut, thanks ad
In java actual byte array lengths sent to server exceeds the chunk size. Never able to make it success😭
I am not experienced with Java, so can't help you there.
@@jiejenn I have achieved it, my issue was related to byte array encoding. Thank you.
@@abdulkhalik759 Can you help me to fix this issue? I got error like The Content-Range header length does not match the provided number of bytes. with my java code.
@@amitkikraft5687 there is a particular way how you need to calculate ranges, share your sample code.
is it possible to avoid the browser authentication part? my purpose would be to schedule a script that uploads a file every day forever, but once activated I have no way to access the machine. How could I do ? thanks
This is something I still haven't figure it out. I would like to know the answer too.
Hey Simone! I have a very similar usecase - I got it to work by adding offline_access to the scopes. You only have to go through the browser authentication once and the token response will include both an access token AND a long-lived refresh token which you can then persist and use for subsequent access token refreshes.
Additional information: docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent
@@jiejenn Yes, it is possible to do when you choose Api Permissions for application as Application in Azure. After that you don't need to use authentication part
@@StanislavGorchakov Do you have any helpful links that may allow me to do this?
How to upload 2GB file to One Drive ?
Isn't that's what the video is for?