OneDrive / onedrive-sdk-python

OneDrive SDK for Python! https://dev.onedrive.com
MIT License
1.08k stars 189 forks source link

Any easy way to upload a file to a specific directory? #160

Open darouwan opened 5 years ago

darouwan commented 5 years ago

I am willing to upload a file to a specific directory, like upload new.txt to new_dir/new.txt However, it seems I must find the directory id firstly then upload the file. Is there any convenient way to implement it?

KTibow commented 4 years ago

@darouwan, try using this code instead:

client.item(drive='me', path="new_dir/new.txt").upload("new.txt")

Consider closing your issue.