question

touchbyte GmbH avatar image
touchbyte GmbH asked

Overwrite content API not working

In some cases I need to overwrite some content in Cloud Drive. I want to use the overwrite API but in the Nodes API documentation there is only the overview that shows that I have to make a PUT request to overwrite the contents of a file. No parameter description, no example, the documentation is just not existing. When I try to do a PUT request, I get the following result from Cloud Drive { message = "Invalid Content-Type. Expected 'multipart/form-data' or 'multipart-mixed', received 'null'"; } I use the following URL for the PUT request { {contentUrl}}/nodes/{id}/content where {id} is the ID of the file that I want to overwrite. Regardless which content type I use, I always get this error message. From my experience with multiple other REST API's, a PUT request just contains the file contents in the request body, so I don't understand why Cloud Drive insists on a multipart request which is for POST uploads. My multipart POST uploads are working fine and I would really much like to implement the overwrite functionality too but I have to know how to do it. Please update the API docs and add a proper description of the overwrite PUT request. Cheers, Helmut
amazon drive
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jamie Grossman avatar image
Jamie Grossman answered
Hi there, Thanks for the question! Unfortunately, we do not support developers overwrite "Metadata" directly at this point; in other words, putNode operation is forbidden. From what I understand, you are trying to overwrite a "content", and I'd just like to let you know that we have since updated our documentation. See here for more information: https://developer.amazon.com/public/apis/experience/cloud-drive/content/nodes Thanks!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

touchbyte GmbH avatar image
touchbyte GmbH answered
Indeed I am trying to overwrite content, not metadata. Now that you have added the missing information to your Nodes API documentation I know that you require a multipart/form PUT request, but that was missing in your documentation and guesswork is not working if you don't know how the multipart parts need to be built. Thanks for fixing the documentation. Cheers, Helmut
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.