Welcome Guest, Not a member yet? Register   Sign In
I can not download the files on a server

Hello! torment a problem - I can not download the files on a server - gives error "You did not select a file to upload.". What's the problem I do not understand.
here's the code:
function save1(){
$config['upload_path'] = './img_company/';            
                    $this->load->library('upload', $config);
                    if ( ! $this->upload->do_upload())
                      echo     $this->upload->display_errors();
                       echo  $this->    upload->    data();

What does your form look like?

my form is requested with "serialize()"

According to the docs, the file input must have the name of "userfile". If it doesn't, you need to explicitly set the name you used in the upload config.

I don't know what you mean by "requested with serialize()". The code you posted doesn't show using serialize() and I can only go by what you showed.

Are you trying to upload files through AJAX using jQuery's serialize method on the form? If you are that won't work. Check this plugin out for a solution: http://cmlenz.github.io/jquery-iframe-transport/

If you don't need to support older browsers (IE10+) you can do AJAX uploads using pure JS through the FileReader API in HTML5.

Theme © iAndrew 2016 - Forum software by © MyBB