Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Errors with the attachTemporaryFile API

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 ?

1 answer

0 votes

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:

Thank you,

Jira Service Management

P.S.: if this answer is correct, please select the ‘accept answer’ button.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

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...

148 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you