You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose private File Upload V2 methods to support multiple file uploads in a single message (#1376)
Currently, `UploadFileV2Context` works by sequentially calling three
private methods in the following flow:
1. getUploadURLExternal (retrieves the upload URL)
2. uploadToURL (uploads the file to that URL)
3. completeUploadExternal (finalizes the upload)
Because these methods are private, developers can only upload one file
per message via `UploadFileV2Context`. However, the Slack API itself
supports uploading multiple files in a single message by running these
steps for each file and then calling completeUploadURLExternal for all
file IDs together.
To unlock this functionality while still using slack-go, I’ve made the
following changes in this PR:
- Made `getUploadURLExternal` and `completeUploadExternal` public
- This allows developers to orchestrate multiple file uploads (Steps 1–3
repeated for each file) and finalize them all in a single message.
- `uploadToURL` remains private for now. This method is simply a regular
POST request handler, not part of Slack’s official API. Since making
getUploadURLExternal and completeUploadExternal public already addresses
the main use case of uploading multiple files, this might be sufficient.
- However, if you feel uploadToURL should also be made public for
consistency, please let me know and I can include that change in this
PR.
0 commit comments