11-20-2012, 03:01 PM
[eluser]Rodolfo[/eluser]
Hi, i'm trying to set my own error messages when something goes wrong on $this->upload->do_upload();
A part of my code is:
$config = array('allowed_types' => 'jpg',
'upload_path' => $this->gallery_path,
'file_name' => $file_data.".jpg"
);
$this->load->library('upload', $config);
if(!$this->upload->do_upload()){
$this->loadIndex($this->upload->display_errors(), null);
}else{ ... }
everything works fine. when i select a file like image.png the display_errors() show me "The filetype you are attempting to upload is not allowed." but i wish to change that message to another one in portuguse, something like "Não é possível carregar o tipo ficheiro seleccionado.".
Can you tell me how can i do that?
Thank you, Rodolfo Gonçalves.
Hi, i'm trying to set my own error messages when something goes wrong on $this->upload->do_upload();
A part of my code is:
$config = array('allowed_types' => 'jpg',
'upload_path' => $this->gallery_path,
'file_name' => $file_data.".jpg"
);
$this->load->library('upload', $config);
if(!$this->upload->do_upload()){
$this->loadIndex($this->upload->display_errors(), null);
}else{ ... }
everything works fine. when i select a file like image.png the display_errors() show me "The filetype you are attempting to upload is not allowed." but i wish to change that message to another one in portuguse, something like "Não é possível carregar o tipo ficheiro seleccionado.".
Can you tell me how can i do that?
Thank you, Rodolfo Gonçalves.