Reputation: 43
I need to upload the 11 mb mp3 file using do_upload in codeigniter.
My upload function :-
$config['upload_path'] = FCPATH . 'uploads/mp3';
$config['allowed_types'] = 'mp3';
$config['max_size'] = '1024*20';
$this->load->library("upload", $config);
$image_data = $this->upload->data();
My php.ini
post_max_size : 32M
memory_limit : 128M
max_execution_time :120
But I cant' upload 11mb mp3 file . But less than 8 mb its working fine. Please help how can I fix this .
The error in the php error log is :-
{"file_name":false,"error":["<p>The filetype you are attempting to upload is not allowed.<\/p>"]}
Upvotes: 1
Views: 9538
Reputation: 25
$config['allowed_types'] = 'mp3';
This line mean you can only upload files in mp3 format.
This error means your file is not mp3 format. change
$config['allowed_types'] = 'mp3';
to
$config['allowed_types'] = '*';
Upvotes: 1