I can't upload images using WYSIWYG, as I get this error - File validation failed
My hosting provider has checked for permissions and they are fine.
Solved! Go to Solution.
I did the following
public_html/vendor/magento/framework/File/Uploader.php
Find and delete
return $this->fileMime->getMimeType($this->_file['tmp_name']);
Worked a treat
Hello @jm0452
are you uploading which type of files?
I am uploading jpg files. It looks like its uploading but nothing appears in the folder
I am using Magento 2.2.5
Hello @jm0452,
That is an issue in Magento 2.2.5 version. Already created an issue for it https://github.com/magento/magento2/issues/16531
Please review it, might be you get an solution.
src: https://github.com/magento/magento2/issues/16531/#issuecomment-404671271
Same problem here after updating to 2.2.5.
I was able to track my problem to Magento/Framework/File/Uploader.php:
private function _getMimeType()
{
return $this->fileMime->getMimeType($this->_file['tmp_name']);
}
The temporary file name stored in $this->_file['tmp_name'] does not have an extension so Mime type returned will not be correct. I was able to solve my issue by going back and use return $this->_file['type'];
Same error in magento 2.2.6
i installed a demo with content in 2.2.6 and experienced the same issue, however, after installing "PHP Fileinfo module" it works, looks like that module is also required ![]()
Thanks for Sharing.. Really time saved after reading this.. ![]()
@PaginasWebdotPE wrote:i installed a demo with content in 2.2.6 and experienced the same issue, however, after installing "PHP Fileinfo module" it works, looks like that module is also required