Docs for new file uploader types#14453
Conversation
|
Thanks for contributing to Streamlit! 🎈 Please make sure you have read our Contributing Guide. You can find additional information about Streamlit development in the wiki. The review process:
We're receiving many contributions and have limited review bandwidth — please expect some delay. We appreciate your patience! 🙏 |
There was a problem hiding this comment.
Pull request overview
Updates the public API docstrings for st.file_uploader and st.chat_input to document newly supported file type specifiers (MIME types, wildcards, and category shortcuts) in addition to file extensions.
Changes:
- Expanded
st.file_uploader(..., type=...)docs to describe MIME types (image/jpeg), wildcards (image/*), and category shortcuts (image,audio,video,text). - Expanded
st.chat_input(..., file_type=...)docs with the same allowed-type semantics and an IANA reference link.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lib/streamlit/elements/widgets/file_uploader.py | Updates the type parameter docstring to include MIME-based specifiers and shortcuts. |
| lib/streamlit/elements/widgets/chat.py | Updates the file_type parameter docstring to include MIME-based specifiers and shortcuts. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Describe your changes
Docs for
st.file_uploaderandst.chat_input, which now support additional strings to identify allowed file types for upload.Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.