Skip to content

files.uploadV2 image alt text is not saved by Slack #2788

Open

Description

@kimoto

Package

@slack/web-api

SDK Version

@slack/web-api@8.2.0. Also seen on 7.19.0. The current main (8730b5e) has the same code.

Node.js Version

v24.21.0

Operating System

macOS 27.0.1

Steps to Reproduce

  1. Create a bot with the files:write and files:read scopes, and invite it to a channel.

  2. Upload an image with alt text:

    await client.files.uploadV2({
      channel_id: 'C0123456789',
      file: './image.png',
      filename: 'image.png',
      alt_text: 'A blue cat',
    });
  3. Wait a few seconds. Then call files.info for the uploaded file and check alt_txt.

Expected Result

files.info returns alt_txt: 'A blue cat', and the image shows an ALT badge on hover in the Slack client.

Actual Result

files.info has no alt_txt field, and the image shows no ALT badge on hover.

Cause: uploadV2 passes the text to files.getUploadURLExternal as alt_text. The API expects alt_txt (docs), so Slack ignores the value. The request body looks like this:

filename=image.png&length=…&alt_text=A%20blue%20cat

When I changed only this key to alt_txt in a local build, files.info returned the text and the ALT badge appeared.

The request type FilesGetUploadURLExternalArguments declares alt_text but not alt_txt, so it does not match the API either.

Fix: #2789

Activity

  1. changed the title [-]files.uploadV2 does not save image alt text (sends alt_text, but the API expects alt_txt)[/-] [+]files.uploadV2 image alt text is not saved by Slack[/+] on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions