Missed Team ’24? Catch up on announcements here.

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

stride - how to upload file with python

herick February 20, 2018

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')

 

 

1 answer

0 votes
Nágila Marques
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 15, 2018

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!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events