Tuesday, May 22, 2012

plupload Codeigniter file upload issue-IO error 2032

i am using plupload script with codeigniter to upload files.I included all required files to make it work but now the issue is if i am trying to upload a image file large than 20 Kb than it will uploaded to the specific folder successfully but if you go and check the image file than only around 25% part of the image is visible other part is shown as a grey color.



and sometimes plupload shows IO error 2032 also.



I check my max post size and file upload size both are large enough to upload a 20 kb image file.



my script is:



    <script type="text/javascript">
// Convert divs to queue widgets when the DOM is ready
$(function() {
var cct = $.cookie("<?php echo $this->config->item("csrf_cookie_name"); ?>");
$("#uploader").pluploadQueue({
// General settings
runtimes : 'gears,flash,silverlight,browserplus,html5',
url : '<?php echo base_url();?>index.php/uploadphoto',
max_file_size : '5mb',
chunk_size : '1mb',
unique_names : true,
multipart:true,
multipart_params:{'<?php echo $this->security->get_csrf_token_name(); ?>': cct},


// Specify what files to browse for
filters : [
{title : "Image files", extensions : "jpg,gif,png,bmp,jpeg"}
],

// Flash settings
flash_swf_url : '<?php echo base_url();?>js/plupload.flash.swf',

// Silverlight settings
silverlight_xap_url : '<?php echo base_url();?>js/plupload.silverlight.xap'
});

});
</script>


and my controller upload photo is like this:



    $upload_path_url = './uploads/';



$config['upload_path'] =$upload_path_url;
$config['allowed_types'] = 'gif|jpg|png|bmp|jpeg';
$config['max_size'] = '5500';

$this->load->library('upload', $config);
if ( ! $this->upload->do_upload('file'))
{
$error = array('error' => $this->upload->display_errors());
//$this->load->view('upload', $error);
}
else
{
$data = $this->upload->data();
}


so give me any suggestion to solve this issue.



-Thanks in advance





No comments:

Post a Comment