close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Simple Upload Not Working...please help

Thread began 3/07/2009 7:24 pm by mail350400 | Last modified 3/10/2009 2:05 pm by mail350400 | 4793 views | 4 replies |

mail350400

Simple Upload Not Working...please help

Hello everyone,

I am hoping that someone can offer some help. I want to create a page where customers can upload a picture to a directory on my server. I have been trying to create a simple test page just to see if the upload works and it doesn't.

I created the file field and the submit button and used Digital File Pro to take care of all of the restrictions, etc. I've tested it both locally and on my web server. The file will not upload. In fact, I don't even think the file information is being sent to the HelperPHP file. I am able to browse for the file I want to upload and the info is filled into the file field. However, when I press submit, it seems to do nothing more than reset the form. My test page reloads with a blank file field, and the "uploaded" file is no where to be found.

I followed the simple file upload instructions that came with DFP. I set max file size and I have it set to only accept web images. I tried uploading text files to see if I would get the proper error messages but nothing happens. I even placed echo statements in the code to print out the values of all the variables. When I press submit, the file field goes blank, the values of all the restrictions I chose appear but the value of $uploadedFile comes out completely blank. I can only assume the uploaded file information is not even making it to the HelperPHP file.

Is there something simple that I am missing? Are there any known bugs with DFP? I just want to create a blank test page with nothing more than a file field and submit button to upload a file. There's not much documentation that comes with DFP so I have absolutely no where else to turn.

I know there is simple php code out there for uploading a file...I've tried it, and it works. But I need the restrictions that DFP can put on file type and size, and the error messages that come along with them. But most of all DFP costs $$$ and I would like it to actually work!

Thanks to anyone who takes the time to read this.

Sign in to reply to this post

Danilo Celic

DFP adds several data bindings to the page to assist in debugging file upload issues. If you open the Bindings panel on your upload page, you should see two entries in the Bindings panel:
"WA Upload Files Global Status" and when expanded, a "Debug Info" item within it.
"WA Upload Files (fileFieldName)" and when expanded, a number of entries, including a "Debug Info" entry.

If you drag the Debug Info item onto your page, and then attempt the upload, you may see more info about what info PHP has on the file that was uploaded (or rather attempted to be uploaded).

You could also post a link to a page that exhibits this issue. Perhaps there is a problem with the coding of the form itself that is causing this issue.

Beyond that, we do have free support, so please do submit a support incident if you need to.

Sign in to reply to this post

mail350400

Working now..but more issues...

Thank you for your reply. It's very useful to see the information and status codes on the file that is being uploaded. I got my sample page to work. It evens shows error messages to the uploader if the file is too large or the wrong type. But now I have another question.

What do I need to do if I have more than one file field? I would like to have 5 file fields and one submit button so customers can upload 5 images at once. Do I need to make each file field its own separate form? I would also like individual error messages to appear for each file that was uploaded if there was a problem. I tried this with separate forms for each file field and tried to upload 2 good files, and 3 problem files that would create 3 different status codes. I pressed submit and got the same error message five times...and no files uploaded, not even the good image files.

How do I set up the form(s) if I want to have more than one file field?

Sign in to reply to this post

Danilo Celic

If you want multiple files to be uploaded at one time, then you have to have the file fields within the same form. If you have 5 file fields, then you can have them all within one form, but you would need to apply the DFP Upload for each file field you want to upload from, so in this case you'd have it applied 5 times. Each instance should have its own set of status messages (including errors)

Sign in to reply to this post

mail350400

Thank You!

Got it! It works. Thank you so much for your help.

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