[-] BO : fixed image upload (except with OVH firewall) #PSCFV-6152 #PSCFV-6157 #PSCFV-5862 #PSCFV-5756 #PSCFV-6074 #PSCFV-5459
This commit is contained in:
1 parent
1e7963ec12
commit
3d1663279a
2 files changed
+14
-15
No files matched your search
@@ -162,14 +162,13 @@ class QqUploadedFileXhr
|
||||
public function upload($path)
|
||||
{
|
||||
$input = fopen('php://input', 'r');
|
||||
$temp = tmpfile();
|
||||
$realSize = stream_copy_to_stream($input, $temp);
|
||||
fclose($input);
|
||||
$target = fopen($path, 'w');
|
||||
|
||||
$realSize = stream_copy_to_stream($input, $target);
|
||||
if ($realSize != $this->getSize())
|
||||
return false;
|
||||
$target = fopen($path, 'w');
|
||||
fseek($temp, 0, SEEK_SET);
|
||||
stream_copy_to_stream($temp, $target);
|
||||
|
||||
fclose($input);
|
||||
fclose($target);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user