-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Modal File Upload #7887
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
base: main
Are you sure you want to change the base?
Modal File Upload #7887
Conversation
There was a problem hiding this 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
Co-authored-by: Lala Sabathil <[email protected]>
docs/components/reference.mdx
Outdated
| 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 | |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
docs/components/reference.mdx
Outdated
"id": 2, | ||
"type": 19, | ||
"values": [ | ||
"1422387274989047838" |
There was a problem hiding this comment.
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
…d/discord-api-docs into anthony/modal-file-upload
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.