Cannot upload picture jpg , xlsx or mail message

Jaidee

Member
DaDaBIK version 11.9-Elba enterprise, installed on 06-28-2023
PHP Version: 7.4.33
mysql version: 8.0.31
Web server: Apache/2.4.54 (Win64) PHP/7.4.33

Cannot upload picture jpg , xlsx or mail message
1688099903009.png
Result
1688099950095.png

also cannot insert xlsx file or email message.

If any parameter has to be set, please INDICATE VERY CLEARLY
>>>> Directory/Subdirectory/name of file and command line.
Thank you
 

deep64blue

DaDaBIK Guru
First thing to check is the 'allowed file extensions' in your config_custom.php, by default jpg, jpeg and xlslx should work but probably not your emails.
 

Jaidee

Member
In file
\include\ config_custom.php
There is not any extension mentioned in my config_custom.php file.
What is the command ?????
/....
$dadabik_session_name = '... your session name here ...';
$timezone = 'Europe/Rome';

VVVVVVVV ?? What command ????
$enable file ='jpeg, xlsx,doc,env,pdf,png';
or
$allow file ='jpeg, xlsx,doc,env,pdf,png';
or
$set file = 'jpeg, xlsx,doc,env,pdf,png';
.../
??? I have no idea I dont find anything in the doc ??
File is uploaded in my sql

1688318948642.png
 
Last edited:

deep64blue

DaDaBIK Guru
There is not any extension mentioned in my config_custom.php file.
What is the command ?????
If there's nothing there you should be running the defaults, you can check these in config.php:-

// allowed file extensions (users will be able to upload only files having these extensions); you can add new extensions and/or delete the default ones; if you add extensions you also have to provide the correct MIME type adding an element to the array $allowed_file_exts_mime_ar, if you delete an extension you have to delete also the corresponding MIME type in the $allowed_file_exts_mime_ar array

$allowed_file_exts_ar[0] = 'jpg';
$allowed_file_exts_ar[1] = 'gif';
$allowed_file_exts_ar[2] = 'tif';
$allowed_file_exts_ar[3] = 'tiff';
$allowed_file_exts_ar[4] = 'png';
$allowed_file_exts_ar[5] = 'txt';
$allowed_file_exts_ar[6] = 'rtf';
$allowed_file_exts_ar[7] = 'doc';
$allowed_file_exts_ar[8] = 'xls';
$allowed_file_exts_ar[9] = 'htm';
$allowed_file_exts_ar[10] = 'html';
$allowed_file_exts_ar[11] = 'csv';
$allowed_file_exts_ar[12] = 'pdf';
$allowed_file_exts_ar[13] = 'jpeg';
$allowed_file_exts_ar[14] = 'docx';
$allowed_file_exts_ar[15] = 'xlsx';

$allowed_file_exts_mime_ar[0] = 'image/jpg';
$allowed_file_exts_mime_ar[1] = 'image/gif';
$allowed_file_exts_mime_ar[2] = 'image/tiff';
$allowed_file_exts_mime_ar[3] = 'image/tiff';
$allowed_file_exts_mime_ar[4] = 'image/png';
$allowed_file_exts_mime_ar[5] = 'text/plain';
$allowed_file_exts_mime_ar[6] = 'application/rtf';
$allowed_file_exts_mime_ar[7] = 'application/msword';
$allowed_file_exts_mime_ar[8] = 'application/vnd.ms-excel';
$allowed_file_exts_mime_ar[9] = 'text/html';
$allowed_file_exts_mime_ar[10] = 'text/html';
$allowed_file_exts_mime_ar[11] = 'text/plain';
$allowed_file_exts_mime_ar[12] = 'application/pdf';
$allowed_file_exts_mime_ar[13] = 'image/jpeg';
$allowed_file_exts_mime_ar[14] = 'application/msword';
$allowed_file_exts_mime_ar[15] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';

It's not recommended for production and you can get strange results but you could try setting $allowed_all_files = 1; in config_custom.php and test it then.
 

Jaidee

Member
Tryed it all including $allowed_all_files = 1;
docx - txt-pdf OK
But still cannot upload PNG-JPG-Jpeg
FYI I have other dada test apps running .. OK !!!
and only one on 2 different systems is not OK (based on the CRM) !!!
 

deep64blue

DaDaBIK Guru
The file is loaded in the Mysql DB, but doesn't show correctly (see image above)
Ok but that's different from being unable to upload!
Result
1688099950095.png
Where do you see this?
 

Jaidee

Member
Thank You for your Support, but sorry, did not help at all !!! :
Found/Identified the problem !!!!
>>>>>PERMISSIONS ON THE DADABIK folder had to be set for the USER !!!! <<<<<<<<<<<<<<<<<
That solved both of the problems ! CSV strage characters and doc-lpg-png downloads !
Now all the problems are RESOLVED
 

Attachments

  • NHR Permissions.JPG
    NHR Permissions.JPG
    38.4 KB · Views: 1
Top