P
PLMresearch
Guest
Running DaDaBIK version 2.2.1 released; New feature: When two or more files with the same name are uploaded, a new name is assigned automatically (e.g. my_file.txt become my_file_2.txt if my_file.txt already exists, my_file_3 if also my_file_2 already exists and so on).
Maybe it was just me, but I had to modify the code (somewhere around line 1115) to the following:
$file_name_new = get_valid_name_uploaded_file($file_name);
$sql .= "'".$file_name_new."', "; // add the field value to the sql statement
// rename the temp name of the uploaded file
copy ($upload_directory.'dadabik_tmp_file_'.$file_name, $upload_directory.$file_name_new);
unlink($upload_directory.'dadabik_tmp_file_'.$file_name);
Hope this helps
Maybe it was just me, but I had to modify the code (somewhere around line 1115) to the following:
$file_name_new = get_valid_name_uploaded_file($file_name);
$sql .= "'".$file_name_new."', "; // add the field value to the sql statement
// rename the temp name of the uploaded file
copy ($upload_directory.'dadabik_tmp_file_'.$file_name, $upload_directory.$file_name_new);
unlink($upload_directory.'dadabik_tmp_file_'.$file_name);
Hope this helps