Uploaded image for project: 'Repository'
  1. Repository
  2. REPO-186

Decide on API behaviour when mimetype does not match file extension

    Details

    • Work Funnel:
      Feature
    • Story Points:
      3
    • Template:

      Description

      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?

      Acceptance Criteria

      • 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

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  gcornwell Gavin Cornwell
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel