03-21-2012, 02:27 AM
[eluser]peekk[/eluser]
Hi!
I have problem when i want to upload more than 1 file on my server, i have two fields for files in my form (userfile, userfile_watermark) my uploading code is:
and both files are uploaded to /sounds/watermark/ and their names are $new_filename_watermark (one should be just: $new_filename). I see that i want to load my library two times and probably that's wrong. How can i reload this or something like that?
Cheers!
Hi!
I have problem when i want to upload more than 1 file on my server, i have two fields for files in my form (userfile, userfile_watermark) my uploading code is:
Code:
if($_FILES['userfile_watermark']['size']>0){
$new_filename_watermark = $this->file_name($_FILES['userfile_watermark']['name']);
$config['upload_path'] = './sounds/watermark';
$config['allowed_types'] = 'mp3|wav';
$config['file_name'] = $new_filename_watermark;
$this->load->library('upload', $config);
$this->upload->do_upload();
}
if($_FILES['userfile']['size']>0){
$new_filename = $this->file_name($_FILES['userfile']['name']);
$config['upload_path'] = './sounds';
$config['allowed_types'] = 'mp3|wav';
$config['file_name'] = $new_filename;
$this->load->library('upload', $config);
$this->upload->do_upload();
}
and both files are uploaded to /sounds/watermark/ and their names are $new_filename_watermark (one should be just: $new_filename). I see that i want to load my library two times and probably that's wrong. How can i reload this or something like that?
Cheers!