EllisLab text mark
Advanced Search
     
Multiupload Demo - possible with CI?
Posted: 18 August 2007 04:14 PM   [ Ignore ]
Avatar
Joined: 2007-08-09
239 posts

I love this: http://swfupload.praxion.co.za/multiuploaddemo/index.php

Does anyone have experience integrating something similar in CI?

I’d be most honored for any assistance/help in getting something similar into my application.

Thanks all.

- sf

 
Posted: 06 September 2007 12:17 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2007-02-14
95 posts

Hmm this is an interesting idea - I’m not sure exactly how that SWF uploader works (it seemed a bit fast imho)...

But this is what I did for the simple file processor. I also would recommend looking at something like this jQuery plugin to build the multi file uploader interface in HTML… http://www.fyneworks.com/jquery/multiple-file-upload/

$success_msg = array();
$error_msg = array();

// more settings can be found (look for preferences) here http://www.ellislab.com/codeigniter/user-guide/libraries/file_uploading.html
$config['upload_path'$this->config->item('root_folder') . 'upload_folder/';
$config['allowed_types''gif|jpg|png';

$this->load->library('upload'$config);
$this->load->library('image_lib');

foreach(
$_FILES as $key => $value){
    
if ( ! $this->upload->do_upload($key)) {
      
// let the world know the file failed
      
array_push($error_msg$this->upload->display_errors());
    
else {
        $file_info 
$this->upload->data();
        
// let the world know of your success
      
array_push($success_msg$file_info['file_name'' successfully uploaded.');
    
}
 Signature 

Trying to do it right the first time! whoops guess that didn’t work out so well…