Search code examples
phpjqueryfile-uploadzend-framework2uploadify

Zend Framework 2 - Uploadify fails with HTTP response 302


I'm trying to get Uploadify to work but I always get a http status code 302.

My jQuery looks like this:

$('#file_upload').uploadify({
        'swf'      : '<?php echo $this->basePath('/swf/uploadify.swf') ?>',
        'uploader' : '<?php echo $this->url('my-module', array('action'=>'uploadify')) ?>',
        'debug': true,
        'preventCaching'  : false
    });

When I call my action via the browser it works. When I call the swf via browser, I get a 200 - so it works as well.

I checked the uploadify-forum but their solutions either don't work or are related to ZF1 specifica...


Solution

  • I solved the problem just using another uploader. Flash uploading is out-of-date anyway so I just used: http://blueimp.github.com/jQuery-File-Upload/

    If you take the basic install it just works (I kept the uploadify upload function). The only drawback is that you have to design the uploading kinda manually... but not that tricky if you are familiar with Bootstrap and jQuery.