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.
×Hi there,
We are trying to use the APIs /rest/servicedeskapi/servicedesk/{serviceDeskId}/attachTemporaryFile and the servicedeskapi/request/{issueIdOrKey}/attachment.
We get the temporary file ID with `attachTemporaryFile` but then, when we call `attachment` with the ID of the temporary file, we get the following errors:
{‘errorMessage’: ‘There was a problem saving the attachments for this comment’, ‘i18nErrorMessage’: {‘i18nKey’: ‘sd.attachment.temporary.session.time.out.ids’, ‘parameters’: []}}
{‘errorMessage’: ‘An error occurred while processing the attachment. Could not save attachment to storage: Source file does not exist /var/atlassian/jirahomelocal/caches/tmp_attachments/temp1076873519188975551’, ‘i18nErrorMessage’: {‘i18nKey’: ‘sd.attachment.create.error’, ‘parameters’: [‘Could not save attachment to storage: Source file does not exist /var/atlassian/jirahomelocal/caches/tmp_attachments/temp1076873519188975551’]}}
It works after several retries or when we add a sleep function in-between so we think it might by linked to the size of the attachment file and the duration of the upload.
Is there a way to ensure that the file attached is properly uploaded before to trigger servicedeskapi/request/{issueIdOrKey}/attachment ?
I have a similar trouble. Look at cookies - they have a string like "JSESSIONID=34777EE5FE1676A4A9CE0ED7322BBB87.node1". Jira using multinode and when you create file at first node and attach his to ticket in another node we show this problem.
Hi @Aymeric Hermant ,
Thanks so much for your question.
There are few scenarios when this can happen. Mainly, when the number of attachments actually created is different from the number of temporary attachment IDs sent.
You have to make sure all the temporary attachments were created correctly before making them permanent attachments.
The other thing is that we have an expiry time for temporary attachments of 1 hour. So you have to make them permanent in that timeframe, otherwise they will be gone and you will see the error in question.
I have previously answered a similar question to yours which might be helpful. Please see here: https://community.atlassian.com/t5/Jira-Service-Management/How-to-add-Attachment-to-Jira-SD-Issue-via-Rest-API/qaq-p/1481185
Thank you,
Artem
Jira Service Management
P.S.: if this answer is correct, please select 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.