Hello!
I want to upload an excel file (.xlsx) into a card as an attachment. However, if I open the card, I can only download an attachment with the type application/octet-stream. How can I upload the file so that a card user (not necessarily me) can see the contents of the excel file?
I wrote the following code:
import requests
key = “cf96243c3494a8473e5caccd2d0f906c”
token = “{{REVOKED}}”
query = {
‘key’: key,
‘token’: token,
‘file’: ‘10228-PA.xlsx’,
‘name’: ‘10228-PA.xlsx’
response = requests.request(
“POST”,
url = “”.join((“https://api.trello.com/1/cards/”, ‘NU6mdURG’, “/attachments”)),
params=query
)
I think it might have something to with mimeType. Can somebody help me how to change the code?