close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File Extension Validation

Thread began 7/16/2012 12:05 am by enquiry272230 | Last modified 8/15/2012 11:38 pm by enquiry272230 | 819 views | 2 replies |

enquiry272230

File Extension Validation

There seems to be an error in the code for the file extension validation.

In order to use it for a simple file name, such as picture.jpg , I have to remove the preg_replace function.

e.g.

$WAFV_Errors .= WAValidateFE(((isset($_FILES["gallery_image"]))?preg_replace('/^.*\./', '', $_FILES["gallery_image"]["name"]) :"") . "",".gif, .jpg, .png",true,2);

Written by server validations, this does not allow any upload.

I have to change it to:

$WAFV_Errors .= WAValidateFE(((isset($_FILES["gallery_image"]))?$_FILES["gallery_image"]["name"]:"") . "",".gif, .jpg, .png",true,2);

to get it to work.

Sign in to reply to this post

Jason ByrnesWebAssist

the File Extension validation takes the Full name as the input, the code you are getting, is because you have selected the File Extension Binding, instead of selecting the file Extension binding, select the Binding for the file Field, it will be the one that does not have a lightning bolt icon next to it, the ones with the lightning bolt icon, are created by Digital File Pro and not needed for file extension validation.

Sign in to reply to this post

enquiry272230

Thanks for clarifying that.

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