Skip to content

Conversation

anthonydiscord
Copy link
Contributor

@anthonydiscord anthonydiscord commented Oct 7, 2025

Have you ever wanted to collect more than text from a user through a modal? With the new File Upload component you can! You can specify a min and max number of files accepted between 0 and 10, and if uploading files within that limit is required before submitting. Any file types are accepted, and the max file size is based on the user's upload limit in that channel.

@anthonydiscord anthonydiscord requested a review from a team as a code owner October 7, 2025 20:06
@anthonydiscord anthonydiscord requested review from colinloretz and removed request for a team October 7, 2025 20:06
@anthonydiscord anthonydiscord changed the title ? Modal File Upload Oct 7, 2025
@colinloretz colinloretz added the not released This issue or PR is referencing a change that is not yet widely released and/or subject to change. label Oct 7, 2025
Copy link
Contributor

@Lulalaby Lulalaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rest is fine (well I made most of it :p)
Oop, even my own mistake fml

| type | integer | `19` for a File Upload |
| id | integer | Unique identifier for the component |
| custom_id | string | Developer-defined identifier for the input; max 100 characters |
| resolved | [resolved data](/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure) | Resolved entities from uploaded files |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation here implies that the resolved is in the payload for the component, but the "Modal Submit Interaction Data Example" implies it is in the modal, not the component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double checked and resolved doesn't appear in the payload for the component. Left a note in values that those refer to the resolved object

"id": 2,
"type": 19,
"values": [
"1422387274989047838"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The items in values here should map to the ids in resolved.attachments

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

Labels

not released This issue or PR is referencing a change that is not yet widely released and/or subject to change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants