Skip to navigation
Accept attribute possibilities for the PrimeVue FileUpload component
04.03.26
* **Specific Image Types:** You can be more specific for better user experience and potentially slightly better browser filtering: * `image/jpeg` or `image/jpg`: JPEG images * `image/png`: PNG images * `image/gif`: GIF images * `image/bmp`: BMP images * `image/webp`: WebP images * `image/svg+xml`: SVG images (Scalable Vector Graphics) * `image/tiff`: TIFF images You can combine multiple image types using a comma-separated list: ```html
``` **Other Common File Types** Beyond images, here are some other common `accept` values you might use: * **Documents:** * `application/pdf`: PDF files * `application/msword`: Older Microsoft Word files (.doc) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document`: Modern Microsoft Word files (.docx) * `application/vnd.ms-excel`: Older Microsoft Excel files (.xls) * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`: Modern Microsoft Excel files (.xlsx) * `application/vnd.ms-powerpoint`: Older Microsoft PowerPoint files (.ppt) * `application/vnd.openxmlformats-officedocument.presentationml.presentation`: Modern Microsoft PowerPoint files (.pptx) * `text/plain`: Plain text files (.txt) * `text/csv`: CSV (Comma Separated Values) files * **Audio:** * `audio/*`: Any audio file * `audio/mpeg`: MP3 audio * `audio/wav`: WAV audio * `audio/ogg`: Ogg Vorbis audio * **Video:** * `video/*`: Any video file * `video/mp4`: MP4 vide * `video/webm`: WebM video * `video/quicktime`: QuickTime video (.mov) * **Archives:** * `application/zip`: ZIP archives * `application/x-rar-compressed`: RAR archives * **All Files:** * `*/*`: Accepts all file types. Use with caution! It's generally better to be more specific. **Using File Extensions** While less common and generally discouraged in favor of MIME types, you *can* use file extensions directly. However, MIME types are the preferred method. * `.jpg, .jpeg, .png, .gif`: (Example)
https://primevue.org/fileupload/
Reply
Anonymous
Information Epoch 1772776292
Make every program a filter.
Home
Notebook
Contact us