Recently I fixed a bug relating to “file uploading” function. The situation:
- Magento 2.3.2
- PHP 7.2.20
- Files permission is correct
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.
My server was missing
php_fileinfo extension, so I enabled it:
extension=fileinfo.soto the end of file
- Restart PHP FPM using this command:
sudo service php-fpm restart.