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 ?