Im trying to attach file with atlassian jira api using python requests module. Attachment is successful but name of the attachment becomes file and thumbnail of the attachment is improper.Below is the screenshot of attachment from jira after successful ticket creation.
Python code given below. "Content-type" : "multipart/form-data" is directly passed from Front-End javascript code. Please note that atlassian documentation mentions that the name of the multipart/form-data parameter that contains the attachments must be file.
file = request.files['file']
files = {'file': file.read()}
response = requests.post(JIRA_URL + '/' + path,
headers={'X-Atlassian-Token': 'no-check'},
auth=(JIRA_USER, JIRA_PASS),
files=files,
proxies={'https': PROXY})
