close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Can DFPro process PDF files?

Thread began 1/22/2010 9:29 am by miav solutions | Last modified 2/13/2014 7:50 pm by anonymous | 1331 views | 4 replies |

miav solutions

Can DFPro process PDF files?

Question, can DFPro handle PDF files for upload? I am trying to configure PS2 which uses DFPro for image uploads and am curious to know if/how to get DFPro to upload PDF files the same as it would an image file?

Sign in to reply to this post

Jimmy Wu

You can use DFP to upload PDF files, you would just not select the web images only checkbox. This will allow any type of file to be uploaded.

If you want to restrict this to pdf files only, you would have to apply validation on the file field to prevent other files from being uploaded. If you have Validation Toolkit or CSS Form Builder, you can apply this validation using those tools.

Sign in to reply to this post

miav solutions

re: PDF files in DFP

Jimmy Wu,
"You can use DFP to upload PDF files, you would just not select the web images only checkbox"

Thank you for your reply to my question, I guess my next question would be to ask why the version of DFP that I have, the version I have is included with PowerStore 2, does not have a "web images only checkbox"?

It seams to be the internal validator used within the Validation ToolKit & DFP Helper.php that thinks the PDF is an image file, it always returns an error from what I think is the attempt to manipulate the file on rename and upload, not sure but really need to get around this.

Sign in to reply to this post

Jimmy Wu

Which version of Digital File Pro are you using?

I'm sorry, I didn't realize you were using this with PowerStore v2. You will have to go to the server behaviors panel and double click on the WA Upload Files server behavior. In step 1, under Upload Settings, you will have to uncheck the Web images only checkbox.

If you are using Digital File Pro v1, you will have to change the code manually. Find the code that looks like this:

php:
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult1""ProductImage""2""[NewFileName]_[Increment]""true"$WA_UploadResult1_Params);
}
?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult2");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult2""ProductThumb""2""[NewFileName]_[Increment]""true"$WA_UploadResult2_Params);
}
?>



Change the "true" to "false", which is the parameter that specifies whether it should be web images only or not.

The validation on the field will continue to only allow images, so you would have to modify the validation code to include pdf files. The input field should look like this:

<input name="ProductThumb" type="file" id="ProductThumb" onchange="WAValidateFE(document.forms[0].ProductThumb,document.forms[0].ProductThumb.value,'- Invalid file extension','.gif, .jpg, .jpeg, .png',document.forms[0].ProductThumb,0,true);WAValidateHD(document.forms[0].ProductThumb,'ProductThumbValidation',false);if (document.getElementById('ProductThumbServerValidation')) document.getElementById('ProductThumbServerValidation').style.display='none'" />



You will have to find the list of allowed file extensions:
'.gif, .jpg, .jpeg, .png'

And change the list to what you want allowed. You will have to do this for both the input boxes.

Sign in to reply to this post

anonymous

As far as i am considered, DFPro can process PDF files. Processing pdf is easy as that of image as long as you embed a professional pdf processor. Above detaield code and tips are really helpful, do as it demonstrated.

Sign in to reply to this post

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...