Welcome Guest, Not a member yet? Register   Sign In
Upload class - allowed filetype issue
#1

[eluser]Zeff[/eluser]
Hi all,

I made a simple upload form for upload rtf files to a congress website:
Code:
// Set upload config
$config['upload_path'] = '/www/_shares/_mycongress/abstracts/';
$config['allowed_types'] = 'rtf';
$config['max_size'] = '10000';
            
$this->load->library('upload', $config);

// Check the upload
if($this->upload->do_upload('abstract'))
{
    $data['upload_data'] = $this->upload->data();
}
else
{
    $data['upload_data'] = $this->upload->data();
    $data['error'] = $this->upload->display_errors();
}

var_export($data);

But uploading doesn't work, I get the following error out of the var_export($data):
Code:
The filetype you are attempting to upload is not allowed

When I change allowed filetypes like this:
Code:
$config['allowed_types'] =  '*';

the upload works... (So path and permissions of upload directory are correct)

What goes wrong?

Thanks in advance for the help!

Zeff


Messages In This Thread
Upload class - allowed filetype issue - by El Forum - 05-30-2012, 01:49 AM
Upload class - allowed filetype issue - by El Forum - 05-30-2012, 06:09 AM
Upload class - allowed filetype issue - by El Forum - 05-30-2012, 06:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB