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

deprecate file.upload and implement new apis #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

koonwen
Copy link
Contributor

@koonwen koonwen commented Jan 3, 2025

Related to #5

I did some initial scaffolding work around this. Haven't done any testing yet so it probably doesn't work.

Some caveats about the new api is that it is a three step query process

  1. get a url to upload to
  2. actually upload the file to the url
  3. specify where the uploaded file should appear in slack

Also with the new api, we cannot specify multiple channels in 3. and you can only call it once which I guess means once you upload it once, it gets thrown away after. https://api.slack.com/methods/files.getUploadURLExternal#markdown I thought about multiplexing the request by getting multiple upload urls but I don't know if this will work as expected and slack will give back multiple unique ids to upload to. That's also kinda inefficient to duplicate the upload work.

In any case, feel free to take over this PR

@koonwen koonwen requested a review from sewenthy January 3, 2025 07:43
@koonwen koonwen mentioned this pull request Jan 3, 2025
@sewenthy
Copy link
Contributor

sewenthy commented Jan 6, 2025

I feel like this change with additional upload_file_v2 is a bit hard to manage, I would rather remove the deprecated version. Honestly, not sure how to handle deprecation in opensource libraries 😅 @Khady if you have any suggestions!

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

Successfully merging this pull request may close these issues.

2 participants