0

I'm trying to attach Uploadify 2.1.4 to Symfony2 but have no luck. When I select a file to upload it is selected, then an Uploadify window appears, closes without errors, but AJAX request doesn't send. All the necessary files are included, the action is accessible via URL. By the way, I did the same thing using Zend Framework and everything worked well...

Here is my code for Uploadify:

$('#upload-file').uploadify(
{
        uploader:       '/bundles/myfile/flash/uploadify.swf',
        script:         '/upload-file',
        cancelImg:      '/bundles/myfile/images/cancel.png',
        folder:         '/uploads',
        auto:           true,
        buttonImg:      '/bundles/myfile/images/upload.png',
        width:          48,
        height:         48,
        wmode:          'transparent',
        fileDesc:       'Text File (*.txt)',
        fileExt:        '*.txt',
        sizeLimit:      8000000,
        multi:          true,
        simUploadLimit: 2
});

Here is my route in routing.yml for file upload:

upload_file:
    pattern:  /upload-file
    defaults: { _controller: MyFileBundle:Default:uploadFile }
j0k
  • 22,600
  • 28
  • 79
  • 90
Grizerg
  • 149
  • 6
  • 10
  • It's strange that I still cannot see and debug an AJAX request made by Uploadify, but after adding of the code (contained in uploadify.php and provided with Uploadify package) into the corresponding action I noticed that files started to be uploaded! Though I cannot track Uploadify's request using Firebug and cannot debug it using XDebug. I'm totally confused! – Grizerg Feb 08 '12 at 21:14
  • 4
    Firebug cannot track sockets opened by flash. – Maerlyn Feb 08 '12 at 23:43
  • What's your code in the uploadFile action? – Teo.sk Feb 09 '12 at 13:19
  • There is a [Symfony2 bundle based on Uploadify package](http://knpbundles.com/ruian/RuianUploadifyBundle). Additionally, it seems easy to use. – Kwadz Jan 09 '13 at 19:07
  • FWIW, https://github.com/1up-lab/OneupUploaderBundle seems to be under more active development and supports a variety of uploaders. – m14t Jun 11 '13 at 18:16

0 Answers0