Welcome Guest, Not a member yet? Register   Sign In
Uploading Files - set error messages
#1

[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.


Messages In This Thread
Uploading Files - set error messages - by El Forum - 11-20-2012, 03:01 PM
Uploading Files - set error messages - by El Forum - 11-20-2012, 10:43 PM
Uploading Files - set error messages - by El Forum - 11-20-2012, 10:52 PM
Uploading Files - set error messages - by El Forum - 11-21-2012, 02:52 AM
Uploading Files - set error messages - by El Forum - 11-21-2012, 08:36 AM
Uploading Files - set error messages - by El Forum - 11-21-2012, 09:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB