The file uploads addon adds an upload icon to comment boxes, which allows the user to upload a file with their comment.Â
A standard WordPress installation typically allows uploading these file types:
.jpg
.jpeg
.png
.gif
.ico
.pdf
 (Portable Document Format; Adobe Acrobat).doc
, .docx
 (Microsoft Word Document).ppt
, .pptx
, .pps
, .ppsx
 (Microsoft PowerPoint Presentation).odt
 (OpenDocument Text Document).xls
, .xlsx
 (Microsoft Excel Document).psd
 (Adobe Photoshop Document).mp3
.m4a
.ogg
.wav
.mp4
, .m4v
 (MPEG-4).mov
 (QuickTime).wmv
 (Windows Media Video).avi
.mpg
.ogv
 (Ogg).3gp
 (3GPP).3g2
 (3GPP2)However, it’s not always possible to upload all these file types—some hosting providers limit the set of valid file types and even the maximum file size you can upload in your installation.
It’s possible to allow additional file types through WordPress’Â upload_mimes
 filter.
function my_custom_mime_types( $mimes ) { // New allowed mime types. $mimes['svg'] = 'image/svg+xml'; $mimes['svgz'] = 'image/svg+xml'; $mimes['doc'] = 'application/msword'; // Optional. Remove a mime type. unset( $mimes['exe'] ); return $mimes; } add_filter( 'upload_mimes', 'my_custom_mime_types' );
https://codex.wordpress.org/Plugin_API/Filter_Reference/upload_mimes
© 2021-2024 PT.GARUDEYA KREASI PERSADA. Trademarks and brands are the property of their respective owners.
User Reviews
There are no reviews yet.