Image upload problem
Hi, I have an image upload file field in my form which creates a normal size file and a thumbnail, but for some reason the thumbnail isn't being created! It's not working on the update page either.
Basically, I am using the same file name for both images, but one is meant to be inserted into a _thumb folder within the imagesupload folder, so the file isn't being overwritten in any way. The image in the folder _thumb is the one not working.
Here's my code on the page for the upload code:
<?php require_once("../webassist/file_manipulation/helperphp.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../imagesupload/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "800",
'ResizeHeight' => "",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
'UploadFolder' => "../imagesupload/_thumb/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "250",
'ResizeHeight' => "",
'ResizeFillColor' => "" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "fld_eventIMG", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>
If I'm missing any other code let me know. I can also give you access to the remote test site, but I'd need to give you that privately.
Also, don't know if this is part of the problem, but within the Image Upload wizard I am unable to set a width for a second image version when I click the + button. To set the size, I have to choose the width and height option, set my prefs there, then choose width which then registers the settings I want... either that, or I simply edit the arrays above to the settings I need.
What wrong here?