Not sure why you are getting the error itself but if i may suggest just making your file like this?
namespace ....
use Magento\Backend\App\Action;
use Magento\Catalog\Model\ImageUploader;
class Upload extends Action{
/**
* Image uploader
*
* @var \Magento\Catalog\Model\ImageUploader
*/
protected $imageUploader;
/**
* Upload constructor.
*
* @param Action\Context $context
* @param \Magento\Catalog\Model\ImageUploader $imageUploader
*/
public function __construct(
Action\Context $context,
ImageUploader $imageUploader
) {
parent::__construct($context);
$this->imageUploader = $imageUploader;
}
public function execute(){
....
}
}
I also suggest you use the Magento image uploader instead of the category uploader unless that is really your intention.
Like here
Create beautiful image upload in configuration magento 2
var/di
,var/generation
and try run di compile again?