upload a file with mime type tar.gz

prettem

Member
Hello,
new project new question :)

I want to upload a *.tar.gz and it fails with mime type error
my settings are:
$allowed_file_exts_ar[16] = 'tar.gz';
$allowed_file_exts_ar[17] = 'tgz';

$allowed_file_exts_mime_ar[16] = 'application/tar+gzip';
$allowed_file_exts_mime_ar[17] = 'application/tar+gzip';

this settting is ok for uploading the file:
$allowed_file_exts_ar[16] = 'gz';
$allowed_file_exts_mime_ar[16] = 'application/tar+gzip';

but the file name of the file being uploaded is: >>>>backup-Teltonika-2023-02-03.tar_825.gz<<<<<<

Does someone know a solution?

best regards
Manuel



Your current DaDaBIK version​

You are using DaDaBIK version 11.8-Elba enterprise, installed on 10.02.2023 (installation code: 1865663e582dad9f52), the latest version of DaDaBIK is 11.8-Elba released on 05.12.2022

You are running the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info​

PHP Version: 8.1.16

mysql version: 10.6.12-MariaDB-0ubuntu0.22.04.1

Web server: Apache

Client: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0
 
Last edited:

deep64blue

DaDaBIK Guru
Does this work?

Code:
$allowed_file_exts_ar[18] = 'gz';

$allowed_file_exts_mime_ar[18] = 'application/tar+gzip';
 

prettem

Member
hi, thank you for your answer, yes it works partially, but it ends up with this confusing filename
between tar and gz is the number dadabik give me as random number for a file upload

>>>>backup-Teltonika-2023-02-03.tar_825.gz<<<<<<
 
Top