-
Notifications
You must be signed in to change notification settings - Fork 189
upload_async returns UploadSession #122
Comments
Never mind, this worked- I just had to call |
Hello. I am experiencing the same problem here when trying to upload large files. Could you detail how do you use Moreover, I have been searching in the repository to understand why this issue is happening. I found out that the problem is in this file. More precisely, function The same function is returning two different type of objects according to the filesize. An Even though it is possible in python, I don't believe it is a clever design since it would cause this kind of misinformation. If it was suppose to be like that, at least the function documentation have to be updated. Could you reopen this issue in order to open this discussion again? Thank you in advance. |
It's been a while since I worked on the code, but if I want to upload a large (much larger than 10MB) file to OneDrive, that code looks like this:
I suspect this makes the would-be async upload block until it's done, and maybe if you wait around long enough the upload will finish without you having to call Hope this helps! |
Hi..Adding to_dict() at the end of upload_async is not working for me. Gives an error upload async has no method to_dict(). |
@jackshifter try running the code in the Python 3 IDLE without to_dict and after the code finishes run type on the result. Can you upload a small file using regular upload? |
@Kansattica I just throw away the result from |
@jackshifter I have the same error as you, have you ever managed to fix it ? Python 3.6 |
@MihajaElrich you don't need to call |
Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #209 for more information |
I am trying to upload a large (~500 MB) file to OneDrive, and after reading some of the issues (#74, #103, #104), I learned that
upload_async
was the way to go, so I have this line:returned_item = client.item(drive='me', path='root').upload_async('./downloaded/' + newname)
However,
returned_item
is of the typeonedrivesdk.model.upload_session.UploadSession
, and notItem
likeupload()
does. According to the answer for issue #51, this should work, but I don't know if this is a bug or if I'm using the code wrong. I haven't been able to find any documentation on this UploadSession business.I'm running version 1.1.8 of the SDK, and this happens with both Python 3.6.3 and 3.5.3.
The text was updated successfully, but these errors were encountered: