CodeIgniter Forums
uploading mp3 files - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forum-11.html)
+--- Thread: uploading mp3 files (/thread-65122.html)

Pages: 1 2


uploading mp3 files - Tecvid - 05-02-2016

hi everyone, i get an error while uploading some mp3 files, i can upload all other file types that r in $config['allowed_types'], any image, any video, any other document, but not any mp3 file, some of them doesn't want to be uploaded Smile the $this->upload->display_errors(); shows nothing but just false, which doesn't allow to understand what is th problem actually, any ideas?


RE: uploading mp3 files - InsiteFX - 05-02-2016

audio/mpeg is the standard way:

Firefox (mp3): audio/mpeg
Firefox (zip): application/zip
Chrome (mp3): audio/mp3
Chrome (zip): application/octet-stream
Opera (mp3): audio/mp3
Opera (zip): application/octet-stream
IE (mp3): audio/mpeg
IE (zip): application/x-zip-compressed


RE: uploading mp3 files - Tecvid - 05-02-2016

(05-02-2016, 11:12 AM)InsiteFX Wrote: audio/mpeg is the standard way:

Firefox (mp3): audio/mpeg
Firefox (zip): application/zip
Chrome (mp3): audio/mp3
Chrome (zip): application/octet-stream
Opera (mp3): audio/mp3
Opera (zip): application/octet-stream
IE (mp3): audio/mpeg
IE (zip): application/x-zip-compressed

n what to do? Smile i didn't change the mimes.php config file


RE: uploading mp3 files - InsiteFX - 05-02-2016

If one of those is missing just add it to the mimes file.


RE: uploading mp3 files - Tecvid - 05-03-2016

(05-02-2016, 01:37 PM)InsiteFX Wrote: If one of those is missing just add it to the mimes file.

none of them is missing


RE: uploading mp3 files - InsiteFX - 05-03-2016

then it may be the way the mp3 was saved etc;


RE: uploading mp3 files - Tecvid - 05-03-2016

(05-03-2016, 04:29 AM)InsiteFX Wrote: then it may be the way the mp3 was saved etc;

maybe, it is very strange, all of them r form the same source, anyway thanks Smile


RE: uploading mp3 files - alotufo - 05-04-2016

(05-03-2016, 05:30 AM)Tecvid Wrote:
(05-03-2016, 04:29 AM)InsiteFX Wrote: then it may be the way the mp3 was saved etc;

maybe, it is very strange, all of them r form the same source, anyway thanks Smile

Make sure that your mp3 files are not larger than the php.ini setting for file size. The two entries to look for are upload_max_filesize and post_max_size.


RE: uploading mp3 files - Tecvid - 05-04-2016

(05-04-2016, 08:14 AM)alotufo Wrote: Make sure that your mp3 files are not larger than the php.ini setting for file size. The two entries to look for are upload_max_filesize and post_max_size.

i am absolutely sure they r not Smile the biggest mp3 file is about 50mb, but limit in my php.ini is 2gb Smile n today i have checked the mime types of those files, they r not audio/mpeg or any other mp3 mime type but they r application/octet-stream, i did add this mime type into mimes.php config, but nothing changed


RE: uploading mp3 files - InsiteFX - 05-04-2016

post_max_size=32M
upload_max_filesize=32M

As mentioned above, both ini settings need to be set to the same value.