-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot upload a large file to a drive #640
Comments
Hello, I am trying also. I was able to generate UploadSession but I don't know how to have kind of "LargeFileUploadTask" with the sdk.
Regards, |
Hello, I did it by myself, I hope it will help someone else.
|
@pacharlier It works for me too. Thanks a lot ! For others reading this, you need these imports to make his code work. from httpx import AsyncClient, HTTPError
from fastapi import HTTPException
from kiota_abstractions.api_error import APIError Also here is how i create my upload session : body = CreateUploadSessionPostRequestBody(
item=DriveItemUploadableProperties(
additional_data={"@microsoft.graph.conflictBehavior": "replace"}
)
)
upload_session = (
await self.app_client.drives.by_drive_id(driveId)
.items.by_drive_item_id(f"{itemId}:/{filePath}:")
.create_upload_session.post(body=body)
) It's a good alternative while we wait for the python sdk to catch up. |
Currently being worked on via microsoftgraph/msgraph-sdk-python-core#530. For tracking we'll close this issue and have this issue tracked via microsoftgraph/msgraph-sdk-python-core#127 |
Hello !
I'm trying to upload a file with a size that is more than 250mb to a drive.
I've been following this guide to help me : https://learn.microsoft.com/en-us/graph/sdks/large-file-upload
Unfortunately, looking at the guide, it seems that this features is only available for C#, Java, PHP and Typscript. I've been trying to find the equivalent of the LargeFileUploadTask class in the python code but i'm not finding anything.
Could someone help with this by telling me if this features is just not implemented yet or how could i do it with the python sdk.
Thanks.
The text was updated successfully, but these errors were encountered: