Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-52492

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

    XMLWordPrintable

Details

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: