[wp-trac] [WordPress Trac] #54433: ALLOW_UNFILTERED_UPLOADS does not work anymore
WordPress Trac
noreply at wordpress.org
Thu Dec 9 20:17:46 UTC 2021
#54433: ALLOW_UNFILTERED_UPLOADS does not work anymore
--------------------------+------------------------------
Reporter: mssd19 | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.8.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by mssd19):
Hello
So what is happening with this ?
Why it is that a site administrator cannot upload a file ? This makes no
sense to me.
my wp-config.php file contains
define('ALLOW_UNFILTERED_UPLOADS',true);
and my wp-content/themes/Avada/functions.php fiel contains
function my_custom_upload_mime_types( $mimes ) {
$mimes['py'] = 'text/x-python';
$mimes['exe'] = 'application/x-msdos-program';
$mimes['sh'] = 'text/x-sh';
$mimes['tgz'] = 'application/x-tar';
$mimes['msi'] = 'application/x-msi';
$mimes['wps'] = 'application/x-executable';
// Return the array back to the function with our added MIME type.
return $mimes;
}
add_filter( 'upload_mimes', 'my_custom_upload_mime_types' );
the .wps extension (i.e WordPress Sucks) was added as it is the only way I
found to upload linux binaries, by adding the .wps extension ...
thanks
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54433#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list