close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Moving Images after Upload

Thread began 12/20/2010 1:55 am by Dave Buchholz | Last modified 1/08/2011 4:04 am by Dave Buchholz | 2009 views | 5 replies

Dave BuchholzBeta Tester

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

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