Ok in HelperPHP.php file (in WA_DigitalFilePro folder) there are 2 functions.
Function 1: WA_DFP_UploadFiles() with a comment that is V2
Function 2: WA_DFP_UploadFile() which if im correct is V1 of DFP.
Function 1 doesnt give specific arguements and uses all the arguements passed dynamicaly while function 2 (DFP1) has specific arguements where u can see that a $defaultFileName variable is passed.
Along the lines function 2 has this code for the "else {" statement (this is the else statement for when there is no file uploaded at all)
else{
$WA_DFP_UploadStatus[$statusName]["statusCode"] = 0;
$WA_DFP_UploadStatus[$statusName]["serverFileName"] = '';
$path_parts = pathinfo($defaultFileName);
$WA_DFP_UploadStatus[$statusName]["fileExtension"] = '';
$WA_DFP_UploadStatus[$statusName]["errorMessage"] = "No file uploaded";
$_SESSION[$sessionName] = $defaultFileName;
}
Function 1 has this code under the same else statement :
else{
$WA_DFP_UploadStatus[$statusName]["statusCode"] = 0;
$WA_DFP_UploadStatus[$statusName]["errorMessage"] = "No file uploaded";
$_SESSION[$sessionName] = '';
}
As you see there is NO $defaultFilename or anything passed as the sessionName on the new DFP2 function so it is normal it does't work correctly. The code is not complete. Also in DFP2 function there is no variable such as $defaultFilename geting the $WA_UploadResult1_Params['DefaultFileName'] data (its the path tha u choose under the Default File in the upload behavior of DFP2 (that doesn't work, currently u have to manually write it in the variable).
So even if the above code was correct which is incomplete, again the above parameter is not geting interpreted in the DFP2 function so its normal there is no using of Default File.
P.S. $defaultFileName in DFP1 holds all the path to the file not only the filename. To get filename should be sth like "$path_parts = pathinfo($defaultFileName);" (mentioned above) and $path_parts['basename'] so it could be inserted to db.
P.S.2 I might be missing code parts, my plan is not to say anything bad about product just to help fix this issue very fast cause its a major bug and DFP2 shouldn't be released with it. Hope this post helps your developers or another developer in WebAssist community and get up with a quick fix.


