Content can be updated via the REST API (
RA-640) by providing a binary body and specifying the mimetype/encoding via the Content-Type HTTP header.
What should the behaviour be in the following scenario?
Some content exists with a name of test.doc and it's binary content is a Word document. Via the API the caller sends the binary for a PDF and specifies application/pdf in the Content-Type header.
Should the extension of the file be changed to match the mimetype i.e. changed to "test.pdf" or should it remain as "test.doc"?
Share has this behaviour and has been the subject of customer issues so should the API "help" or fully trust the client?
- We have a decision on the behaviour described above (taking into the linked issues)
- The REST API implementation code has been updated, if required
- The behaviour has been described in the design documentation and API definition