Contents
hide
The problem
Recently I fixed a bug relating to “file uploading” function. The situation:
- Magento 2.3.2
- PHP 7.2.20
- Files permission is correct
- The
var/log/exception.logdoesn’t show the error detail
The only clue that I have is the warning: File was not uploaded.
After check this Github issue, I figure out that the file’s “mime-type” may cause the problem.
The solution
My server was missing php_fileinfo extension, so I enabled it:
- Add
extension=fileinfo.soto the end of file/etc/php.ini. - Restart PHP FPM using this command:
sudo service php-fpm restart.