close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Upload Files is not working - no errors

Thread began 8/19/2012 7:39 pm by sublucent | Last modified 8/21/2012 12:25 am by sublucent | 1149 views | 3 replies

sublucentBeta Tester

Upload Files is not working - no errors

Hello,

I recently upgraded to 1.0.7. On a new project I added a form to upload images, like I have on many projects in the past, only this time nothing happens when the form is submitted.

I have added the code to ensure error reporting and uploads debug info is displayed but they are not showing anything either. I created a simple test page to make sure that other code on the page wasn't interfering and the simple page is not working either.

Here is the simple page. Any thoughts?

<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
<?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' => "../images/testimg/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["submit"]) || isset($_POST["submit_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "testest", "0", "", "false", $WA_UploadResult1_Params);
}
?>
<?php
if($WA_DFP_UploadStatus["WA_UploadResult1"]["statusCode"] == 1){
$WA_Redirect_URL = "temp_upload_test.php?success=1";
$WA_Redirect_KeepQS = false;
if ($WA_Redirect_URL != "") {
if ($WA_Redirect_KeepQS && $WA_Redirect_URL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "") {
$WA_Redirect_URL .= ((strpos($WA_Redirect_URL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_Redirect_URL);
}
}
?>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="temp_upload_test.php" enctype="multipart/form-data" name="test" method="post" >
<input name="testest" type="file" />
<input type="submit" name="submit" value="submit" />
</form>
<?php echo WA_DFP_AllUploadsDebug(); ?>
<?php
echo("POST:<pre>");
var_dump($_POST);
echo("</pre>");
echo("FILES:<pre>");
var_dump($_FILES);
echo("</pre>");
?>
</body>
</html>



And the error info:

Status object: WA_UploadResult1
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded
POST:
array (size=1)
'submit' => string 'submit' (length=6)
FILES:
array (size=1)
'testest' =>
array (size=5)
'name' => string 'Picture002.jpg' (length=15)
'type' => string '' (length=0)
'tmp_name' => string '' (length=0)
'error' => int 1
'size' => int 0

Thanks for your help!

Edit: If I keep trying the form it will randomly work?? Very strange.

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