Skip to content

fix(web-api): uploadV2 alt text was never saved by Slack - #2789

Open
kimoto wants to merge 1 commit into
slackapi:mainfrom
kimoto:fix/upload-alt-txt
Open

kimoto wants to merge 1 commit into
slackapi:mainfrom
kimoto:fix/upload-alt-txt

Conversation

@kimoto

@kimoto kimoto commented Oct 22, 2026 •

Copy link
Copy Markdown

Summary

Fixes #2788.

Alt text passed to files.uploadV2 was not saved by Slack. The SDK sent it to files.getUploadURLExternal as alt_text, but Slack reads only alt_txt (docs) and silently ignores alt_text. This PR sends it under the name Slack reads. The uploadV2 option keeps its name, so callers do not need to change anything.

FilesGetUploadURLExternalArguments gains alt_txt and keeps alt_text as @deprecated for backward compatibility, so existing code that passes it still compiles.

Checked by: the multi-file upload test, which now passes alt text; and uploads to a real workspace, where only this branch's image got alt_txt in files.info and the ALT badge on hover.

Before (published 8.2.0):
Slack message from published 8.2.0, hovered, no ALT badge

After (this branch):
Slack message from this branch, hovered, with ALT badge

Requirements

@kimoto
kimoto requested a review from a team as a code owner October 22, 2026 12:01
@changeset-bot

changeset-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1d570ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/web-api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @kimoto to sign the Salesforce Inc. Contributor License Agreement.

@kimoto kimoto changed the title fix(web-api): preserve image alt text during file uploads fix(web-api): uploadV2 alt text was never saved by Slack Oct 22, 2026
files.uploadV2 sent image alt text to files.getUploadURLExternal as
alt_text, which Slack ignores. Send it as alt_txt. The request type
gains alt_txt and keeps alt_text as deprecated so existing code
compiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

files.uploadV2 image alt text is not saved by Slack

1 participant