Welcome Guest, Not a member yet? Register   Sign In
Multiupload Demo - possible with CI?
#1

[eluser]stevefink[/eluser]
I love this: http://swfupload.praxion.co.za/multiuplo.../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
#2

[eluser]Code Arachn!d[/eluser]
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/

Code:
$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.');
    }
}




Theme © iAndrew 2016 - Forum software by © MyBB