.bin files with two MIME types
-
Many thanks for any help provided in advance.
I have uploaded your plugin. In my functions.php I have this code
function allow_special_uploads ( $existing_mimes=array() ) {
$existing_mimes[‘slave’] = ‘application/octet-stream’;
$existing_mimes[‘bin’] = ‘application/octet-stream’;
$existing_mimes[‘kess’] = ‘application/zip’;return $existing_mimes;
}
add_filter(‘upload_mimes’, ‘allow_special_uploads’);This allows me to upload .bin files with the defined MIME type. However, I sometimes get .bin files with a different MIME type. Namely the MIME type x-dosexec. I am unable to upload .bin files with this x-dosexec type. I can’t seem to permit .bin files to have two different MIME types.
Your plugin says Error: The file type could not be determined.
VALIDATION:
Naive Name: test.bin
Naive Extension: bin
Naive Type: application/octet-stream
Magic Type: application/x-dosexec
Best Type:FINAL:
Name: test.bin
Extension:
Type:
Code: 64SYSTEM:
Kernel: Linux nl1-ts109.a2hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
PHP: 8.1.28
Modules: Core; PDO; PDO_ODBC; Phar; Reflection; SPL; SimpleXML; bcmath; bz2; calendar; clos_ssa; ctype; curl; date; dba; dom; enchant; exif; fileinfo; filter; ftp; gd; gettext; hash; i360; iconv; imagick; imap; intl; json; ldap; libxml; litespeed; mbstring; mysqli; mysqlnd; odbc; openssl; pcntl; pcre; pdo_mysql; pdo_pgsql; pdo_sqlite; pgsql; posix; pspell; readline; session; shmop; soap; sockets; sqlite3; standard; sysvmsg; sysvsem; sysvshm; tidy; tokenizer; xml; xmlreader; xmlwriter; xsl; zip; zlib
WordPress: 6.5.4
Plugins: BeRocket_LGV_domain [1.1.4]; admin-menu-editor [1.12.2]; adminimize [1.11.11]; blob-mimes [1.3.19]; classic-editor-and-classic-widgets [1.3.8]; contact-form-7 [5.9.5]; creame-whatsapp-me [5.1.6]; decorator-woocommerce-email-customizer [1.2.9]; ewww-image-optimizer [7.7.0]; hide-login-page [1.1.9]; js_composer [7.7.1]; loco-translate [2.6.10]; ninjafirewall [4.5.11]; print-invoices-packing-slip-labels-for-woocommerce [4.5.3]; upb_parallax [1.5.15]; user-role-editor [4.64.2]; user-switching [1.7.3]; woo-checkout-field-editor-pro [2.0.2]; woo-stripe-payment [3.3.71]; woocommerce [8.9.3]; woocommerce-file-approval [9.9]; woocommerce-files-upload [76.7]; wordpress-seo [22.8]; worker [4.9.20]; wp-mail-smtp [4.0.1]
Theme: fortuna [3.20]
- You must be logged in to reply to this topic.