close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Image File Upload Fail

Thread began 1/22/2013 10:37 am by gpaul | Last modified 1/22/2013 1:23 pm by Jason Byrnes | 1250 views | 4 replies |

gpaul

Image File Upload Fail

I am unable to successfully upload an image. I have other files and sites that have worked as expected, and I have tried duplicating, having an issue here. I have attached the helper file.

Hopefully you can point me in the right direction

Gary

This is the upload script.

// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../images-memorial",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "300",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(WA_DFP_AnyUploadSuccess()){
WA_DFP_UploadFiles("WA_UploadResult1", "memimage", "3", "[ExistingFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}

Attached Files
helperphp.zip
Sign in to reply to this post

gpaul

I should have added, I have error reporting on and I am getting this

array(1) { ["memimage"]=> array(5) { ["name"]=> string(11) "newtodd.jpg" ["type"]=> string(10) "image/jpeg" ["tmp_name"]=> string(14) "/tmp/php8WGooX" ["error"]=> int(0) ["size"]=> int(8090) } }
Notice: Undefined index: memimage in /var/www/html/gary/upload-memorial-images.php on line 29

Notice: Undefined variable: userid in /var/www/html/gary/upload-memorial-images.php on line 98

Gary

Sign in to reply to this post

Jason ByrnesWebAssist

the helperphp_php.php file doesn't help much.

i need a copy of the upload-memorial-images.php file please.

Sign in to reply to this post

gpaul

Please find attached two file. They are both copies. I am using PDO to connect.

File 1 is the first form page create-memorial-copy.php

The second is used for insert and for more file uploads.

upload-memorial-images.php

Thank you for your help

Gary

Attached Files
upload-memorial-images-copy.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you are binding to the image column using the post:


$memimage = $_SESSION['memimage'] = trim($_POST['memimage']);



there are 2 problems here:

1) This code comes be fore the code to upload the file.


2) You should be binding to the server file name biding in the WA Uploaded files group instead of using the post.

Sign in to reply to this post

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