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

Cannot get the example to work #117

Closed ch1n3s3b0y closed 9 years ago

ch1n3s3b0y commented 9 years ago

Hi

I'm on Windows 8 using XAMPP. I have tried this on one of my own pages and also I have tried the example and neither work. The page loads fine. All of the scripts seem to be loading fine, but whenever I upload a file I just get the error 'Unable to upload file'.

Any idea where I am going wrong?

LPology commented 9 years ago

Set the debug option to true in your JS configuration. This will report errors into the console. Can you do that and tell me what it says?

ch1n3s3b0y commented 9 years ago

[Uploader] Server response:
Warning: require(/Simple-Ajax-Uploader-master/extras/Uploader.php): failed to open stream: No such file or directory in C:\xampp\example\Simple-Ajax-Uploader-master\examples\basic_example\file_upload.php on line 2

Fatal error: require(): Failed opening required '/Simple-Ajax-Uploader-master/extras/Uploader.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\example\Simple-Ajax-Uploader-master\examples\basic_example\file_upload.php on line 2

I think I see the problem...

ch1n3s3b0y commented 9 years ago

I change the require path to:

$root = realpath($_SERVER["DOCUMENT_ROOT"]); require($root.'/Simple-Ajax-Uploader-master/extras/Uploader.php');

Now I'm getting the error

'Upload directory is not writable'

I'm on windows 8, XAMPP. I would think the directory is writeable.

ch1n3s3b0y commented 9 years ago

Got it working!

LPology commented 9 years ago

Excellent! Glad to hear it. I'll go ahead and close this one out.