Uploading .amr with codeigniter

后端 未结 1 580
执念已碎
执念已碎 2021-01-24 10:54

I have been trying to get .arm upload to a website built in codeigniter. I know its not a default mine type so I added it with this:

\'amr\'   =>  \'audio/amr         


        
相关标签:
1条回答
  • 2021-01-24 11:13

    You could try looking at system/libraries/Upload.php line 199:
    $this->_file_mime_type($_FILES[$field]);
    Change that line to
    $this->_file_mime_type($_FILES[$field]); var_dump($this->file_type); die();
    Now you redo your uploading and see what the actual mime type the browser sent to your server.

    One silly and insecure workaround I did was adding that actual mime type to mimes array. But this could change if this question get answered :)

    0 讨论(0)
提交回复
热议问题