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.