Answers for "Sorry, This File Type Is Not Permitted for Security Reasons"

PHP
0

Sorry, This File Type Is Not Permitted for Security Reasons

// Allow Unfiltered Uploads in Your wp-config.php File

define('ALLOW_UNFILTERED_UPLOADS', true);

// wp-config.php
// You can add the following code to the file,
// anywhere above the line reading near line no. 75 to 90,
/* That’s all, stop editing. Happy blogging. */
// if you want to more learn you wisit our website http://roginetwork.com/
// Rogi Network
// +923022020318
// [email protected]
Posted by: Guest on October-07-2021
1

Sorry, This File Type Is Not Permitted for Security Reasons

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' );
Posted by: Guest on August-05-2021

Code answers related to "Sorry, This File Type Is Not Permitted for Security Reasons"

Browse Popular Code Answers by Language