Restrict FileType for Upload not working for .Avif .heif etc..
-
I have restricted the file upload and only allowed .zip files to be uploaded, still I am able to upload following file endings in addition to .zip:
.avif .heif .heics .heifs .xls .svgz .json
No difference in being logged in or not logged in when I am using the form.
Tested in Firefox/Chrome.
I tried adding this to my themes functions.php or as a mu-plugin with no effect:add_filter( 'forminator_upload_allowed_files', function( $file_types ) { // Define the file extensions to remove $remove_types = [ 'avif', 'heif', 'avif', 'heic' ]; // Also includes heic if desired // Filter out the disallowed types $file_types = array_diff( $file_types, $remove_types ); return $file_types; } );I also installed Plugins like WordPress Plugins like “WP Upload Restriction – WordPress plugin” with no effect.
Can you help me?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.