OneDrive / onedrive-sdk-python

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

How to upload an item to onedrive #198

Closed Dskpupper closed 2 years ago

Dskpupper commented 2 years ago

image Does this mean its authenticated? Also how do i upload an excel file to my onedrive account using this coomand returned_item = client.item(drive='me', id='root').children['newfile.txt'].upload('./path_to_file.txt')

"newfile.txt" is my file name and " path_to_file" is C:\users\downloads. Do i need to provide values to drive and id? Thanks

KTibow commented 2 years ago

Welcome, adventurer. This is a forgotten land, and I am the only one who dares to help around here. However, I can't understand your question at all. What are you trying to do, what code did you use (share all of your code, with ``` formatting), and what happened instead?

Dskpupper commented 2 years ago

I am not able to connect to local host , I tried both methods given in the repo

image image

i get the microsoft login web page when i click the auth_url , but it local host doesnt connect .

My goal is , I need to connect OneDrive to AWS databricks using python script so i can read download files. Basically want onedrive accessible in databrikcs .

KTibow commented 2 years ago

but it local host doesnt connect .

That's intentional. Did you even read the text? "Copy everything in the address bar after "code=", and paste it below."

KTibow commented 2 years ago

@Dskpupper were you able to get your code to work? I'm happy to help.