Just to follow this up as I had some time to do some testing this morning. I was able to get DFP (or File Manipulation as it is called now) to upload an image both to the secure and public image directories.
The final code looked like this:
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../../../uploads/test/images/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
'UploadFolder' => "../../../../public_html/uploads/test/images/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'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", "image", "2", "[NewFileName]_[Increment]", "false", $WA_UploadResult1_Params);
}
?>
And this is what the debug code reported:
Debug: Status object: WA_UploadResult1
statusCode : 1
errorMessage :
clientFileName : IMG_0991.jpg
fileExtension : jpg
serverFileName : IMG_0991.jpg
serverSimpleFileName : IMG_0991
serverDirectory : /home/xxx/secure_html/uploads/test/images/
contentType : image/jpeg
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : 124169
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName : IMG_0991.jpg
fileExtension : jpg
serverFileName : IMG_0991.jpg
serverSimpleFileName : IMG_0991
serverDirectory : /home/xxx/secure_html/uploads/test/images/
contentType : image/jpeg
fileSize : 124169
imageWidth : -1
imageHeight : -1
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
statusCode : 1
WA_UploadResult1_2:
clientFileName : IMG_0991.jpg
fileExtension : jpg
serverFileName : IMG_0991.jpg
serverSimpleFileName : IMG_0991
serverDirectory : /home/xxx/public_html/uploads/test/images/
contentType : image/jpeg
fileSize : 124169
imageWidth : -1
imageHeight : -1
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
statusCode : 1
Note that I am uploading in the secure folder initially as that is where the admin system is located.