1

I want to use this plugin in my symfony 2 project:

https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin

I followed all the steps in the documentation. But it keeps saying that this path is not found :

error:
Failed to load resource: the server responded with a status of 404 (Not Found)

path:
http://localhost/vdvinfra/web/js/file-uploader/server/php/ 

My code in the twig file :

  <input id="fileupload" type="file" name="files[]" data-url="{{asset('js/file-uploader/server/php/')}}" multiple>

my js :

<script type="text/javascript">
  $(function () {
    $('#fileupload').fileupload({
      /* ... */
      progressall: function (e, data) {
        var progress = parseInt(data.loaded / data.total * 100, 10);
        $('#progress .bar').css(
          'width',
          progress + '%'
        );
      }
    });
  });
</script>
0

1 Answer 1

1

I don't think web/ should be part of your path (Unless http://localhost/vdvinfra/web/ is the base path of your application). Could you print the output of {{asset('js/file-uploader/server/php/')}}?

Also, when you want Symfony to handle your uploads, I recommend you take a look at the OneupUploaderBundle bundle. It has step by step instructions about how to set up Symfony with the jQuery File Uploader Plugin.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.