Skip to content

Document file_types filtering - #8506

Merged
colinloretz merged 12 commits into
discord:mainfrom
Lulalaby:components/file-type-filtering
Aug 5, 2026
Merged

Document file_types filtering#8506
colinloretz merged 12 commits into
discord:mainfrom
Lulalaby:components/file-type-filtering

Conversation

@Lulalaby

@Lulalaby Lulalaby commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

🐐 You can now restrict which files a user is allowed to upload, in both File Upload components and ATTACHMENT command options.

Provide a file_types array with up to 10 entries. Each entry is either one of the image, video, or audio file groups, or a dot-prefixed file extension such as .pdf:

{
   "type": 19, // ComponentType.FILE_UPLOAD
   "custom_id": "file_upload",
   "file_types": ["image", ".pdf"]
}

@Lulalaby
Lulalaby requested a review from a team as a code owner July 31, 2026 19:42
@Lulalaby
Lulalaby requested review from colinloretz and removed request for a team July 31, 2026 19:42
@colinloretz

Copy link
Copy Markdown
Contributor

Thanks! We're going to roll this out next week and get this merged in.

Comment thread developers/change-log.mdx Outdated
Comment thread developers/components/reference.mdx Outdated
Comment thread developers/interactions/application-commands.mdx Outdated
Comment thread developers/components/reference.mdx Outdated
Comment thread developers/interactions/application-commands.mdx Outdated
Comment thread developers/reference.mdx Outdated
Comment thread developers/change-log.mdx Outdated
@colinloretz
colinloretz force-pushed the components/file-type-filtering branch from 5a38685 to 2cd0c18 Compare August 5, 2026 18:26
Comment thread developers/reference.mdx
Lulalaby and others added 12 commits August 5, 2026 23:07
Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
Co-authored-by: Colin Loretz <colin.loretz@discordapp.com>
Co-authored-by: Michael <vmphase.dev@gmail.com>
Co-Authored-By: Michael <vmphase.dev@gmail.com>
git bash for the rescue
Co-authored-by: Michael <vmphase.dev@gmail.com>
@Lulalaby
Lulalaby force-pushed the components/file-type-filtering branch from 433a0a2 to 76105e8 Compare August 5, 2026 21:08
@colinloretz
colinloretz merged commit f36e7ca into discord:main Aug 5, 2026
3 checks passed
@Lulalaby
Lulalaby deleted the components/file-type-filtering branch August 5, 2026 21:45
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.

4 participants