[eluser]Sara rad[/eluser]
Last night i change my controller to this :
Code:
// Set upload rules for screen
$config['upload_path'] = 'files/shop/';
$config['allowed_types'] = 'jpg|png|gif';
$config['max_size'] = '200';
$config['max_width'] = '1024';
$config['max_height'] = '768';
// Set upload rules for source
$config['source']['upload_path'] = 'files/shop/source/';
$config['source']['allowed_types'] = 'rar|zip|psd|cdr|ai';
$config['source']['max_size'] = '24000';
// Select random name
$data['art_saved_name'] = $this->send_art_model->select_rand_name('arts_for_sell');
// Set name for saveing file
$config['file_name'] = $data['art_saved_name'];
$config['source']['file_name'] = $data['art_saved_name'];
// END OF RULES SETTING --
// Load Upload Library
$this->load->library('upload',$config);
if( ! $this->upload->do_upload(array('screen','source')))
{
echo $this->upload->display_errors();
}
and now script dont upload anything and show this warning :
Quote:Message: Illegal offset type in isset or empty
Filename: libraries/Upload.php
Line Number: 146
and file uploading library show this errors :
Quote:The upload path does not appear to be valid.
You did not select a file to upload.
But path is valid and i select a file .
i know my code is wrong , I hope you help me :x
thanks