cancel
Showing results for 
Search instead for 
Did you mean: 

File Validation failed while upload an image

File Validation failed while upload an image

I have set up a Magento 2.4.6 project, which my supervisor has placed on Git. I have pulled the project and set it up on my local machine. The project is working fine, except that image uploads are not functioning anywhere.

I have tried several solutions, including modifying the Uploader.php file by changing the _getMimeType() function to: private function _getMimeType()
{
return $this->_file['type'];
// return $this->fileMime->getMimeType($this->_file['tmp_name']);

I have also configured the necessary extensions in the php.ini file and set the memory_limit to 4G. Additionally, I have given full control permissions to the pub/media and pub/static folders.

Despite these efforts, I am still unable to resolve the issue with image uploads. If there is any solution available, please share it with me.