View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

DFP2 questions

Thread began 5/14/2009 2:11 pm by kbettenc296716 | Last modified 5/17/2009 7:38 am by kbettenc296716 | 3310 views | 17 replies

fragop363190

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.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...