Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Good morning erveryone. I am tasked with streamlining the Support-Ticket creation. Part of the requirement is to create attachments on newly opened tickets.
Jira-SDs Rest-API requires the user to first upload a file to a servicedesk as a temporary attachment, and then make it permanent by attaching the file to an issue. In my case, the request to attach the file to an issue intermittendly returns HTTP-Code 500 along with the following message:
{"errorMessage":"An error occurred while processing the attachment.
Could not save attachment to storage: Source file does not exist /var/atlassian/application-data/jira/caches/tmp_attachments/temp3914246537425063270",
"i18nErrorMessage":
{"i18nKey":"sd.attachment.create.error",
"parameters":
["Could not save attachment to storage: Source file
does not exist /var/atlassian/application-data/jira/caches/tmp_attachments/temp3914246537425063270"]}}
In about 90% of all cases, the request returns statuscode 201 and creates the attachment as expected. Since the AttachmentID is returned from the previous request, my reasoning is that Jira-SD has indeed processed the attachment and assigned it an ID. My questions are:
Thank you very much, i am at a loss.
Hi Jonas, Thanks so much for your question. Regarding your questions,
That being said, JSD uses Jira internal APIs to create temporary attachments. And when Jira fails to monitor temporary attachment, it throws the exception you have mention. Check out Jira logs for more details and contact Atlassian Support if you require further assistance. Regarding using JSD REST API on front-end, the way to add temporary attachment is to make a call like this:
Which you can do with Fetch API like this:
Then you should use those temporartAttachmentId values to create permanent attachments using the POST /request/${issueKey}/attachment request:
Thank you, Artem PS: if this answer is correct, please click the “Accept answer” button |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.