Upload attachments using Rest API puts the file comment in wrong encoding

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Summary

      When uploading an attachment with a Rest API call, if the comment that goes with the attachments has umlaut characters, it will not be displayed correctly.

      Steps to Reproduce

      1. Create a page and try to add attachments using Rest API. The file name and comment has umlaut characters
        • {code:borderStyle=solid}
          curl -v -S -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=@testfile_áÁéÉíÍóÓöÖőŐúÚüÜűŰäÄ.jpg" -F "comment=test comment áéíóöőúüű" "http://localhost:8090/rest/api/content/65663/child/attachment" | python -mjson.toolc
          {code}

      Expected Results

      File name and comment should be displayed with umlaut characters.

      Actual Results

      Only file name is correct, the comment is wrong.

      Notes

      1. The use of Postman REST API plugin gives the same result
      2. Terminal encoding is UTF-8
      3. When terminal encoding is ISO8859-2, the file name becomes wrong and the comment is correct

            Assignee:
            Hasnae (Inactive)
            Reporter:
            Omar Raissi (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: