// Force clearstatcache on product image upload

This commit is contained in:
Jerome Nadaud
2013-11-26 15:46:21 +01:00
parent 69c99f49c9
commit dc90bb6227
5 changed files with 54 additions and 34 deletions
+4 -5
View File
@@ -168,25 +168,24 @@ class UploaderCore
file_put_contents($file_path, fopen('php://input', 'r'));
}
$file_size = $this->_getFileSize($file_path);
$file_size = $this->_getFileSize($file_path, true);
if ($file_size === $file['size'])
{
$file['save_path'] = $file_path;
//TODO do image processing
}
else
{
$file['size'] = $file_size;
unlink($file_path);
$file['error'] = 'abort';
$file['error'] = Tools::displayError('Server file size is different from local file size');
}
}
return $file;
}
protected function validate($file)
protected function validate(&$file)
{
$post_max_size = $this->getPostMaxSizeBytes();