View Full Version : Acceptable File Type Uploads
webassist144944
07-05-2009, 03:16 PM
I need to check to make sure that the file that gets uploaded is one of:
JPG, TIF, EPS, PSD or AI
I don't want to resize or change the file image at all but upload it as is if it is one of the file types.
Is there someplace (e.g. in WA_DigitalFilePro/HelperPHP.php) that I can easily change the filetypes allowed?
Thanks in advance for any help here!
Don
Ray Borduin
07-06-2009, 08:14 AM
Validation Toolkit can be used to validate file types, but it can't be easily added in Digital File Pro itself.
webassist144944
07-16-2009, 01:07 PM
Thanks Ray, VT worked great!
Don
neileisen207079
04-05-2010, 10:31 AM
I am using a form to upload pdf files. With no validation it works. If I try the validation it fails.
This is the code:
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "filetype.php";
$_SESSION['WAVT_pdfmenusInsert_199_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateFE($WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] . "",".pdf",true,1);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"pdfmenusInsert_199");
}
}
?>
I also tried it using the file extension rather than the serverFileName but that didnt work either. Help?
Jason Byrnes
04-13-2010, 08:53 AM
instead of using the server file name, use the Simple file name binding found under the form collection. I am including a screen shot showing the binding I mean. The binding shows a form named WADAInsertForm, and File Field named ProductThumb
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.