Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-67715

REST API 413 entity too large for POST /rest/api/2/issue/{issueIdOrKey}/attachments

    XMLWordPrintable

Details

    Description

      Summary

      Using REST API to upload issue attachment POST /rest/api/2/issue/{issueIdOrKey}/attachments may result in 413 Entity too large response, even if it is allowed to have bigger uploads. However later on the attachment can be seen as attached to the issue.

      Steps to reproduce

      1. use REST API endpoint to upload an attachment to a Jira issue: POST /rest/api/2/issue/{issueIdOrKey}/attachments
      2. select a file that is large - usually the bug affects files larger than 120MB, but there is no precise size threshold.
      3. make sure that file size does not exceed the attachment size allowed for the instance.

      Expected Results

      1. REST API response is 200 OK including representation of attached file in the response body.
      2. File is successfully attached to the issue.

      Actual Results

      1. REST API response is 413 Entity too large
      2. File is successfully attached to the issue.

      Workaround

      After receiving the 413 Entity too large response to attachment upload request, use GET /rest/api/2/issue/{issueIdOrKey} endpoint to fetch issue details and confirm whether the file was attached, together with the attachment details.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              czawadka@atlassian.com Cezary Zawadka
              Votes:
              17 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: