0

Im using Valum's file uploader in Laravel framework. I have this code in my view:

                <div id="file-uploader">        
                    <noscript>          
                        <p>Please enable JavaScript to use file uploader.</p>
                    </noscript>         
                </div>

                <script>     

                    function createUploader(){            
                        var uploader = new qq.FileUploader({

                            element: document.getElementById('file-uploader'),
                            action: 'file-uploader/server/php.php',
                            debug: true,

                        });           
                    }

                    window.onload = createUploader;     
                </script> 

When i want to upload file im not getting any error, but result is "Upload failed" and in console is:

  [uploader] xhr - server response received
  fileuploader.js:1016 [uploader] responseText = 

Documentation states:

It should be {success:true} for completed requests. If it's not, then you have a problem with your server-side script.

Server-side script is original. Now what should I do?

Tomas Turan
  • 1,195
  • 3
  • 17
  • 27
  • Have you placed `file-uploader/server/php.php` inside your public folder? Can you access it via `http://URL/file-uploader/server/php.php` ?? – fire Dec 12 '14 at 12:33
  • well we need to see the php code then! my guess is the directory it uploads the file to doesn't have the right permissions, you should make sure its CHMOD to 777 – fire Dec 12 '14 at 14:00

0 Answers0