LPology / Simple-Ajax-Uploader

Javascript file upload plugin with progress bar support. Works in all major browsers, including IE7+, Chrome, Firefox, Safari, and Opera. No dependencies - use it with or without jQuery.
995 stars 267 forks source link

Incorrect upload name or no file uploaded #72

Closed jasondavis closed 9 years ago

jasondavis commented 10 years ago

I have tried to copy the exact demo page code from the demo for the Frontend and then used the default PHP code that is in the project Repo for the backend, no matter what I change I always get this error in the frontend, it appears to do the upload by showing the progress bar and then shows this error message and does not save any file

Incorrect upload name or no file uploaded

I could really use some help, have spent a whole day and my boss is very unhappy and I have no idea what the problem is, it does not trigger any other errors!!!!!!!!

Please help.

Demo can be found here https://www.channelletter.com/channel-wizard/testuploader/index2.html

7diac commented 9 years ago

Try to set the multipart to true. The default value is false and it cause the information to be sent via POST instead of FILES.

shahroq commented 9 years ago

Did u find any solution for this?

LPology commented 9 years ago

Can those of you who are having this issue post your PHP code?

Also, any error messages from your error log would be extremely helpful.

shahroq commented 9 years ago

Hi, Sorry, i forgot to change 'imgfile' at the: $uploader = new FileUpload('imgfile'); ThanX

mhulse commented 9 years ago

For anyone else, the trick here is making sure this line of your JS:

name: 'uploadfile',

… matches this line of your PHP:

$Upload = new FileUpload('uploadfile');

If you are copy/pasting from examples, those variables are not equal out of the box.

LPology commented 9 years ago

Good call. I've updated Uploader.php to make the default value of $uploadFile to be "uploadfile" to matches the examples. Thanks for your input.