file upload not working
I have a simple file upload to upload a web image to the site (for an avatar). I followed the DFP2 pdf instructions but the upload does not save the image to the site. I do not get any errors so I think i might be missing something since this is my first time using DFP2.
does the form need an action? I tried it with/without the "$editFormAction" for the form action. The DFP2 did not apply an action so i wasn't sure if it was necessary.
the helper php file is in place. I added the file upload debugger and it appears the upload is successful, but no image appears in the upload folder after completion. Here is the url:
upload.php
any suggestions would be great. thank you.
here is my form code:
<form action="" method="post" name="uploadForm" enctype="multipart/form-data">
<input name="upload" id="upload" type="file" />
<input type="submit" name="uploadSave" id="uploadSave"/>
</form>
here is the php code:
require_once("WA_DigitalFilePro/HelperPHP.php");
// EDIT FORM ACTION
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "files/member_photos/",
'FileName' => "photo",
'DefaultFileName' => "",
'ResizeType' => "1",
'ResizeWidth' => "100",
'ResizeHeight' => "135",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["uploadSave"])){
WA_DFP_UploadFiles("WA_UploadResult1", "upload", "0", "", "JPG:60", $WA_UploadResult1_Params);
}