Skip to content

Commit 82065a1

Browse files
authored
Set correct header for attach_temporary_file for ServiceDesk (#560)
1 parent b99bcbc commit 82065a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

atlassian/service_desk.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,10 @@ def attach_temporary_file(self, service_desk_id, filename):
432432
url = 'rest/servicedeskapi/servicedesk/{}/attachTemporaryFile'.format(service_desk_id)
433433

434434
with open(filename, 'rb') as file:
435-
result = self.post(path=url, headers=self.experimental_headers,
435+
headers = {
436+
'X-Atlassian-Token': 'no-check',
437+
'X-ExperimentalApi': 'opt-in'}
438+
result = self.post(path=url, headers=headers,
436439
files={'file': file}).get('temporaryAttachments')
437440
temp_attachment_id = result[0].get('temporaryAttachmentId')
438441

0 commit comments

Comments
 (0)