-
Notifications
You must be signed in to change notification settings - Fork 40
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
OneDrive uploads #8
Comments
I am also having this problem. I can't see how the client functions in the docs of this repo correspond to the requests in the Microsoft docs. |
@Pikamander2 Uploading a file to drive, or updating an existing file should be handled properly now that #23 got merged I think |
@Disruption - That's great to hear. Would it be possible to add a simple example of how to upload a file to the documentation? |
Oh, I guess it would be this one?
|
@Pikamander2 I can try to provide a PR adding that, but it should be fairly straight-forward, like:
Note: If you have a File instance you can use the associated methods along with os.path to get the right values |
Yes, that would be the one, filename is the full path it will have on remote, and file_path is the local path where your file is. |
@Disruption - I'm trying to set up a simple example script right now, but looking through the "Usage" section, but it seems pretty light on detail in terms of getting things set up, so I'm struggling to get it working. These first four lines appear to work without throwing any errors:
But after that, I'm not entirely sure what I need to do. If I add this fifth line:
Then I get this error:
If I add this fifth line:
Then I get this error:
My goal here is just to automate the uploading of some files from my PC to my OneDrive folder. |
Hello @Pikamander2 Apart from the client id and client secret you need a token from outlook (a refresh token that comes from the login is the best) Regarding files, that's because those methods (for uploading and updating files) are on the new release that hasn't come out yet Cheers! |
Does this library support uploading files to OneDrive? Are there any examples?
Here are the relevant API docs: https://docs.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0
The text was updated successfully, but these errors were encountered: