Skip to content

update file component description #7503

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

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

Conversation

advaith1
Copy link
Contributor

The file component description says

This is similar to the embeds field of a message but allows you to control the layout of your message by using this anywhere as a component.

but that makes no sense since it has nothing to do with embeds. Without CV2, these would be rendered directly from the uploaded files.

@advaith1 advaith1 requested a review from a team as a code owner April 23, 2025 09:42
@advaith1 advaith1 requested review from anthonydiscord and removed request for a team April 23, 2025 09:42
@anthonydiscord
Copy link
Contributor

Oops good catch. This should have read as:

This is similar to the attachments field of a message but allows you to control the layout of your message by using this anywhere as a component.

Do you mind switching it to that instead?

@advaith1
Copy link
Contributor Author

This is kind of weird because

  • In rendering, it is based on attachments, but the attachments field is actually populated primarily by the files uploaded in the formdata. when sending a message, the attachments field is just used to optionally provide metadata like alt text.
  • When uploading files for components, you still upload files the same way and use attachments for metadata
  • This component also renders files differently from attachments in normal messages, since usually images, videos, and audio files embed, but here they show the generic file ui

Therefore I don't think it makes much sense to say it's similar to the attachments field, from the perspective of someone sending a message with components.

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