Skip to content
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

Remove folder traversel #39

Closed
fkalis opened this issue Nov 23, 2016 · 0 comments
Closed

Remove folder traversel #39

fkalis opened this issue Nov 23, 2016 · 0 comments

Comments

@fkalis
Copy link
Owner

fkalis commented Nov 23, 2016

Folder traversal is inefficient and error-prone. Setting the root folder via ID is not very user friendly.

Create empty folder (necessary for feature #25)

POST https://graph.microsoft.com/v1.0/me/drive/root:/this/path/will/be/created:/children

{
    "name": "withSubfolder",
    "folder": {}
}

or

PATCH https://graph.microsoft.com/v1.0/me/drive/root:/this/path/will/be/created/withSubfolder

{
    "folder": {}
}

Beforehand verify, that the folder does not exist yet, so it does not have to be touched

GET https://graph.microsoft.com/v1.0/me/drive/root:/this/path/will/be/created/withSubfolder

If this returns with status code 404, the folder can be created

Upload file (folder will automatically be created)

PUT https://graph.microsoft.com/v1.0/me/drive/root:/containing/folder/name/filename.txt:/content

This is the content.

An upload session can be requested via

POST https://graph.microsoft.com/v1.0/me/drive/root:/containing/folder/name/filename.txt:/createUploadSession

...
fkalis added a commit that referenced this issue Dec 30, 2016
fkalis added a commit that referenced this issue Dec 30, 2016
fkalis added a commit that referenced this issue Dec 30, 2016
fkalis added a commit that referenced this issue Dec 30, 2016
@fkalis fkalis closed this as completed in 853eb0d Dec 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant