EllisLab text mark
Advanced Search
     
Problem with Uploadify
Posted: 02 October 2012 01:00 PM   [ Ignore ]
Joined: 2012-08-26
13 posts

- Hello everybody, i am having a problem with jquery uploadify. My js 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(abcd){
     
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(eventIDfileObjresponsedata){
      
$("#uploaded_preview").html("<img  />");
    
}
   }
); 
. When i click Browse buttion, the result :
Chrysanthemum.jpg (858.78KB) - HTTP Error 

. Sorry for my English, help me, thanks all!

 
Posted: 04 October 2012 05:57 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2010-09-24
240 posts

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.

 Signature 

Taskhub - Your local Marketplace for tasks and errands

 
Posted: 04 October 2012 10:30 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2012-04-18
215 posts

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

 Signature 

CjaxFw for CI, 5,000 downloads in last 3months

http://cjax.sourceforge.net/

Follow Me on Twitter @AjaxFramework
https://twitter.com/ajaxframework

Checkout my Blog

 

 

 
Posted: 04 October 2012 01:59 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2012-08-26
13 posts

- Thanks all, but this error will happend when i use firefox browser. Why ?