I have been trying to upload file on a stride room for a couple of days. The question is, the code does not return any error message, but the file is not uploaded. I wonder why.
There are couple of similar questions, but they are all about Jira
Please help me with this issue. I used the code below
(FYI: get_access_token() is just access token string)
def upload_file(file_path):
url = 'https://api.atlassian.com/site/{}/conversation/{}/media'.format(CLOUD_ID, CONV_ID)
with open(file_path, 'rb') as f:
requests.post(url,
files = {file_path : f},
headers={
'authorization': "Bearer " + get_access_token(),
'content-type' : 'application/vnd.ms-excel'
})
upload_file('item_sales.xlsx')
Hi,
How are you? I hope you are doing well :)
We would like to suggest you access https://community.developer.atlassian.com/c/stride-development and post this question in there for further help on this and many more questions related to the topic.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.