files_upload_v2 `initial_comment` doesn't accept markdown
Hi!
We switched to files_upload_v2, the problem with timeots is gone, but looks like something broken with slack markdown in initial_comment. Link tags not working anymore - formatting example from docs sends to chat as text <http://www.example.com|This message is a link> (bold, italic and others works well)
Tried on files_upload again and link tag works
Originally posted by @Plebolution in https://github.com/slackapi/python-slack-sdk/issues/1165#issuecomment-1284318055
I had the same issue when i switched to files_upload_v2!!
Hello! I tried different workarounds but couldn't make links work with files_upload_v2
👋 Thanks for reporting this! I've escalated this to the server-side teams responsible and will get back with notice of a fix or workaround respectively.
I've put this on the server-teams' radar, but don't have news yet to share on whether they will support mrkdown formatting for the initial_comment in the V2 files upload.
Here's a workaround for this for now that still uses the files_upload_v2 method:
- Use client.chat.postMessage to post the message / comment, note the timestamp
- Use files_upload_v2 and supply the thread timestamp in the method to attach the files.
@srajiang that will add the uploaded file in a thread, how can I keep the uploaded file within the initial message?
This ending up working for me https://github.com/slackapi/python-slack-sdk/issues/1194#issuecomment-1076962918
Cross-posting workaround https://github.com/slackapi/node-slack-sdk/issues/1561#issuecomment-1722323302, which combines files.upload with chat.update. It's not ideal (requires two API calls), but at least it achieves the desired end state.
Hi! Thank you very much for your patience regarding this issue. The server-side has recently been enhanced, so now the API accepts mrkdwn format for the initial_comment parameter! Let me close this issue now 🙇