Welcome Guest, Not a member yet? Register   Sign In
pdf The filetype you are attempting to upload is not allowed.{SOLVED]
#1

[eluser]bobbob[/eluser]
I have searched for this in the forums with no luck.
Some people solved it by adding to the mime types for the pdf array.
that didn't do it for me.
Any other thoughts please.
The controller:

Code:
$config['upload_path'] = '../entries/';
            $config['allowed_types'] = 'gif|pdf|doc|jpg';
            $config['max_size']    = '8000';
            
            
            $this->load->library('upload', $config);
            if($this->upload->do_upload()) {
            echo 'worked';
            $data = array('upload_data' => $this->upload->data());
            $path = $this->upload->data('full_path');
            $newpath = $this->upload->data('file_path');
            $theext = $this->upload->data('file_ext');
            }else{
                $error = array('error' => $this->upload->display_errors());
                echo $this->upload->display_errors();
                echo 'There was an error uploading your file';
            }
Just noticed this is also happening for the doc files too.
Images are fine
#2

[eluser]bobbob[/eluser]
Simply put image files at the end of the list of allowed types as shown in this thread:
http://ellislab.com/forums/viewthread/105777/


doc|pdf|gif|jpg|png


Would never have thought of that!!




Theme © iAndrew 2016 - Forum software by © MyBB