Unable to upload xlsx file
Been trying to upload a xlsx file but the end result in slack is not what I expected.
Here is my code, almost the same as the one in the README
file = Faraday::UploadIO.new(
'test.xlsx',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
)
client.files_upload(
channels: '#general',
file: file,
filetype: 'xlsx',
filename: 'test',
title: 'Xlsx test',
initial_comment: 'Check xlsx upload'
)
Been using the same code for pdf and csv upload (while changing mime_type, filetype and the file) and it was working fine.
Maybe something slack-side?
Contacted them now, will write back to you when I have more information
It doesn't appear to be possible to generate a preview when uploading via the API per https://github.com/slackapi/python-slack-sdk/issues/991#issuecomment-814481675
I think this can be closed. This isn't the library but the API itself. It exhibits the same behavior using the API directly.
curl -F [email protected] -F "initial_comment=Test xlsx" -F channels=C0000000 -H "Authorization: Bearer $SLACK_API_TOKEN" https://slack.com/api/files.upload