Help with file upload |
[eluser]NachoF[/eluser]
how do you receive a file that comes from a form??... i cant find an example at the user guide... help please
[eluser]Dam1an[/eluser]
Really? Cause I find the page on the File uploading class to cover everything you need
[eluser]NachoF[/eluser]
Haha, ok.. I guess I didnt know where to look... one question though.. Ive no experience in this... can the form be the same as a form with regular values that are being retrived using $this->input->post('sometext');??? I mean My form has a bunch of input texts and one input file... is there any way to so it all with just one form??
[eluser]NachoF[/eluser]
Code: $config['upload_path'] = './uploads/'; "The filetype you are attempting to upload is not allowed."
[eluser]Michael Wales[/eluser]
Code: <pre> That will let you know what mime type your server is interpreting for that file, then check the mimetypes config file to make sure the extension is one of the allowed extensions for that mime type.
[eluser]NachoF[/eluser]
Ok.. txt is working now..... never really figured out why it wasnt working... but pdfs arent working now... on mimes.php I have Code: 'pdf' => array('application/pdf', 'application/x-download'), Code: $config['allowed_types'] = 'txt|png|doc|docx|xls|xlsx|pdf|mp3|wma|wmv|gif|jpg|png'; Code: $error = array('error' => $this->upload->display_errors()); Code: Array ( [file_name] => PDFlib-Lite-license.pdf [file_type] => application/pdf [file_path] => /var/www/vhosts/----/httpdocs/----/ [full_path] => /var/www/vhosts/----/httpdocs/----/PDFlib-Lite-license.pdf [raw_name] => PDFlib-Lite-license [orig_name] => [file_ext] => .pdf [file_size] => 30.29 [is_image] => [image_width] => [image_height] => [image_type] => [image_size_str] => ) |
Welcome Guest, Not a member yet? Register Sign In |