none
Office 365 Files REST API - Creating / Uploading a file RRS feed

  • Question

  • I am trying to use the Office 365 REST API to interact with my OneDrive for Business instance and am having an issue creating / uploading a file. In the documentation on this page (https://msdn.microsoft.com/en-us/office/office365/api/files-rest-operations#FileoperationsCreateorupdateafileREST) it states that if the file does not exist on a POST to /uploadContent then it will create the file. However I am returned the following error:

    "error - {code=ItemNotFound, message=The requested resource doesn't exist}"

    If the file DOES exist already it will work fine, but if it does not it does not seem to work as intended. Is there something I am missing? Thanks!

    Monday, June 8, 2015 5:21 PM

All replies

  • Hi bscharm,

    >> If the file DOES exist already it will work fine, but if it does not it does not seem to work as intended. Is

    What do you mean by "file does exist"? Did the file exist in your client or in the OneDrive? Could you share us where the error happend? Whether it happened when you get the local path or when you upload the file to OneDrive? It would be helfpul if you could share us your key code.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, June 10, 2015 10:01 AM