Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove files.upload in favor of files.getUploadURLExternal, etc. #514

Open
gregorbg opened this issue Jun 17, 2024 · 2 comments
Open

Remove files.upload in favor of files.getUploadURLExternal, etc. #514

gregorbg opened this issue Jun 17, 2024 · 2 comments

Comments

@gregorbg
Copy link

The current README file (as of opening this issue) references the client.files_upload method to upload files. Under the hood, this uses the files.upload endpoint which has been deprecated by Slack: https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay

The article that I linked above describes the migration path, but it only has code samples for JS, Python and Java.
What is the recommended way to use the files.getUploadURLExternal endpoint with this client?

In particular, I can see that the response of the files.getUploadURLExternal invocation contains a link which Slack expects me (the client) to make a POST request to. That means I'd have to open and maintain my own HTTP client (Faraday etc.) on top of this library's Slack client. That seems a bit overkill, is there a better way?

@dblock
Copy link
Collaborator

dblock commented Jun 18, 2024

Sounds like we need to remove files_upload (maybe be coming in via #509 already) and reimplement something similar to Python's files_upload_v2. Want to give it a shot @gregorbg?

@dblock dblock changed the title files.upload becoming deprecated, sample in README needs replacement Remove files.upload in favor of files.getUploadURLExternal, etc. Jun 18, 2024
@booleanbetrayal
Copy link

We just hit this issue after having to regenerate new "Modern Apps" (via a Legacy Bot) as part of a deprecation notice remediation and now are unable to use the files_upload feature without Slack::Web::Api::Errors::MethodDeprecated errors, since any new bots do not have access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants