Magento – Upload HTTP Error in admin on file upload (Nginx)

adminadmin-panelimage-uploadnginx

I am getting the following error on uploading files in Magento admin.

Upload HTTP Error

I have added the following to my php.ini

upload_max_filesize = 200M
post_max_size = 200M
memory_limit = 512M

I have also added this to my nginx config

client_max_body_size 200m;

enter image description here

I have also toggled between https and http

Best Answer

If you are using PHP 7 then go to

lib/Varien/File/Uploader.php

Find the following code

$params['object']->$params['method']($this->_file['tmp_name']);

And replace it with

$params['object']->{$params['method']}($this->_file['tmp_name']);
Related Topic