You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
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 |
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.