Logo

dev-resources.site

for different kinds of informations.

Further Tips on Slack's files.upload Deprecation

Published at
4/19/2024
Categories
slack
slackapi
slackplatform
api
Author
seratch
Categories
4 categories in total
slack
open
slackapi
open
slackplatform
open
api
open
Author
7 person written this
seratch
open
Further Tips on Slack's files.upload Deprecation

As you might already know, the deprecation of Slack's files.upload API and its migration guide to a newer method were announced recently:

https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay

In this article, I'll share some additional tips that you may find useful about the announcement.

So, what exactly sets this new way apart from the prior method? The biggest difference is that, even when your code receives a response from files.completeUploadExternal API endpoint, processing such as security scan is still asynchronously ongoing on the Slack server side. As a result, sharing the uploaded files in a channel could take some time. This behavior change is a compromise intended to resolve the performance issue that the former files.upload API had, particularly with larger files.

This might necessitate some changes to your custom code, especially if you have subsequent operations that rely on a channel message sharing the uploaded files.

If you have such subsequent processing triggered by file share completion, there are two potential approaches:

  1. Regularly poll the files.info API and delay until the file metadata is updated
  2. Respond to the Event API's file_shared event delivery with a different event listener code

Lastly, the v2 method of the official SDKs should function almost seamlessly by just switching the method to call. However, there are still a few differences to keep in mind:

  1. It is now possible to upload several files in one message (yeah, great enhancement!)
  2. The parameter to set the channel to share the files has been changed from channels to channel_id, and you can no longer specify multiple channels or specify a channel by name
  3. As mentioned above, since the new upload process is asynchronous, when having any subsequent processing that needs to occur synchronously, polling the files.info API or utilizing Events API would be required

That's it! I hope you find this article helpful 👋

slack Article's
30 articles in total
Favicon
Open-Source Collaboration Progress
Favicon
Collaborating to Slack as an Open-Source Developer: Part 2
Favicon
Collaborating to Slack as an Open-Source Developer
Favicon
How to integrate Alerta into your Business
Favicon
[Apache Superset] Topic #5, Automated Alerts and Reporting via Slack/Email in Superset
Favicon
How to send a message to Slack workspace members using an SQL statement
Favicon
Enable Slack Notifications for Amplify Builds Directly to a Slack Channel
Favicon
How to use Slack for Beginners.
Favicon
How to make Slack Workflow input form
Favicon
Magento 2 Slack Notifier Module
Favicon
We Built our First SaaS - Sweet Kudos
Favicon
How to Customize Slack Fonts Using Stylus for Improved Readability
Favicon
10 Slack emojis that developers should use
Favicon
Format your Slack messages, please!
Favicon
ChatGPT Slack Bot
Favicon
Effortless Bug Tracking: Pcloudy’s Integration with Asana and Monday.com
Favicon
AI-Powered News Summaries for Slack
Favicon
Enhancing Decision-Making: AI In Microsoft Teams & Slack
Favicon
Slack vs. Discord: Choosing Your Tech Community's Playground
Favicon
Laravel 10 Send Notifications in Slack Channel
Favicon
Build a Slack app with SlackKit
Favicon
Automatically create Google Tasks from Slack/Cisco Webex Teams keywords with webMethods.io Integration
Favicon
How can you become an AWS Community Builder?
Favicon
Automate PagerDuty alerts in Slack/Cisco Webex Teams with webMethods.io Integration
Favicon
I developed a no-code tool that integrates Anthropic into Slack, Teams, and HubSpot
Favicon
"Community Communication: Slack vs. Discord - Deciding the Ideal Platform"
Favicon
Easier TypeScript API Testing with Vitest + MSW
Favicon
Further Tips on Slack's files.upload Deprecation
Favicon
New on Zeeve: Slack & Microsoft Teams Integration for Streamlined Deployment Alerts
Favicon
Rapid Bolt app development w/ Slack CLI and sandboxes

Featured ones: