CodeIgniter Forums
Problem with Uploadify - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem with Uploadify (/showthread.php?tid=54943)



Problem with Uploadify - El Forum - 10-02-2012

[eluser]fatangel26[/eluser]
- Hello everybody, i am having a problem with jquery uploadify. My js code :
Code:
var base_url = 'http://localhost/winesey/';
    
    $("#link_upload").uploadify({
    'uploader'  : base_url + 'assets/backend/uploadify/uploadify.swf',
    'script'  : base_url + 'backend/cms/uploadify',
    'cancelImg'  : base_url + '/assets/backend/uploadify/cancel.png',
    'folder'  : 'assets/uploads/link/',
    'fileDesc'  : 'Files Ảnh',
    'fileExt'  : '*.jpg;*.jpeg;*.gif;*.png',
    'sizeLimit'  : 100 * 1024 * 1024,
    'multi'   : false,
    'auto'   : true,
    'onError'  : function(a, b, c, d){
     if(d.status=404)
      alert('Errors.');
     else if(d.type === "HTTP")
      alert('error'+d.type+": "+d.info);
     else if(d.type === "File Size")
      alert(c.name+' '+d.type+' Limit: '+Math.round(d.sizeLimit/1024)+'KB');
     else
      alert('error'+d.type+": "+d.text);
    },
    'onComplete' : function(event, ID, fileObj, response, data){
      $("#uploaded_preview").html("<img  />");
    }
   });
. When i click Browse buttion, the result :
Code:
Chrysanthemum.jpg (858.78KB) - HTTP Error
. Sorry for my English, help me, thanks all!


Problem with Uploadify - El Forum - 10-04-2012

[eluser]Rok Biderman[/eluser]
Well, making Uploadify work with Codeigniter was always and still is tricky. The key problem is that the flash component is using the default php session, which Codeigniter does not. There are some other issues, but this is the main problem.

I've put on a working example onto Github, so you can see how it works. I think it will be much easier than explaining the steps, especially as you're still new.


Problem with Uploadify - El Forum - 10-04-2012

[eluser]Ajaxboy[/eluser]
There is a Cjax plugin that can get uploadify working without pain and without any configuration other than the one on the constructor, see sample: http://cjax.sourceforge.net/examples/plugin_uploadify.php


Problem with Uploadify - El Forum - 10-04-2012

[eluser]fatangel26[/eluser]
- Thanks all, but this error will happend when i use firefox browser. Why ?