I am using this curl request to upload a file:
curl -s -F file=@%s -F channels=%s -F initial_comment=%s -F token=%s https://slack.com/api/files.upload\'
I did some research on files.upload
and my result is that it is not possible to upload a file in a way that would make it editable by other users.
If you upload a file as plain text (e.g. filetype = plain
) the file becomes editable, but only by the user who uploaded the file, e.g the token owner. The API does not provide an option to make it editable by other users.
If you upload a file as post (e.g. filetype = post
) the owner of the file can later make that post editable by anyone, but only manually. Again, there is no option to do that by the API.
The only solution to your issue I can think of is creating a Slack app that manages file uploads and editing. e.g. you could have a Dialog with a textarea element to edit the content of a file. Textarea
elements can hold up to 3.000 chars.
Note that for that app you probably want to store your files outside of Slack while it can be edited, because Slack does not allow you to edit a file after it has been uploaded. (At least not with the official API, there is the unofficial files.edit method, but this can only be used in special cases).