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

Example Error: Unable to upload file #161

Closed Mjunior1 closed 8 years ago

Mjunior1 commented 8 years ago

Hello,

With his example, I am unable to upload the file.

Already changed the path to the path of my directory but the error message is always the same, how to fix?

LPology commented 8 years ago

Post the code you're using. What error message you receiving?

Set the debug option to true to see the response from the server in the console. What does it say?

Mjunior1 commented 8 years ago

I'm using the same code that comes in your examples directory.

I just changed the path of the file to file_upload.php:

$upload_dir = '/images/';

Only ... And come the error message:

"Unable to upload file"

How do I debug as the example that comes to your examples of package?

LPology commented 8 years ago

What is the response from the server? What is the response HTTP code?

Mjunior1 commented 8 years ago

I'm not a programmer, you could tell me how to get this information? I'm just using your example to be able to add in a job of my code. As I said earlier, I only changed the arquivp file_upload.php

$upload_dir = '/images/';

And the following error occurs on the screen:

https://s23.postimg.org/tprimbwvf/error.png

See file_upload.php:

https://s22.postimg.org/ts8hw7ggh/error.png

Mjunior1 commented 8 years ago

I attached my code as an example, you can tell me where I am wrong to not be able to upload?

http://rifaverde.com.br/example.zip

LPology commented 8 years ago

In the index.html file, add this line to your plugin settings under the line button: btn, (line 55):

debug: true,

So that it looks like this:

button: btn,
debug: true,

This options turns on the debugging feature of the plugin so that data about uploads is displayed in the browser console.

In your browser, press F12 and find the "Console". Attempt a file upload. There should be information that appears in the console with "[Uploader]" in front of it. Copy and paste all of that info please.

Mjunior1 commented 8 years ago

Perfect!! The bar has to be inverted.

Eg: '\files\Uploader.php'

Very thanks