Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

PUT file by REST API to OneDrive for Business failed with error itemNotFound

$
0
0

I tried to PUT file (no matter new or existing) to OneDrive for Business by REST API like following:

PUT /_api/v2.0/me/dirve/items/01I5XFTRAER6NJC7ZRH5FJNXHG4XE5ZU7V/children/Gold1.jpg/content

The API failed with "{"error":{"code":"itemNotFound","message":"The resource could not be found."}}"

"01I5XFTRAER6NJC7ZRH5FJNXHG4XE5ZU7V" is the resource ID of the parent. "List Children" API can list children in the folder. (And I can upload files to OneDrive for Business by Drag&Drop in browser.)

Here is document of the API that I used to upload files.

https://dev.onedrive.com/items/upload_put.htm

By the way, when I download the file by the following command, it works. (This means that the resource exists):

GET /_api/v2.0/me/drive/items/01I5XFTRGXDA7TXDMGXJCYF7AIGB2GDZET/content

Could someone please tell me what is wrong?

Thank you for advance. 





Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>