|
@@ 1470-1472 (lines=3) @@
|
| 1467 |
|
} |
| 1468 |
|
|
| 1469 |
|
$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name); |
| 1470 |
|
if ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName)) { |
| 1471 |
|
return $this->setError(elFinder::ERROR_INVALID_NAME, $name); |
| 1472 |
|
} |
| 1473 |
|
|
| 1474 |
|
if (!($file = $this->file($hash))) { |
| 1475 |
|
return $this->setError(elFinder::ERROR_FILE_NOT_FOUND); |
|
@@ 1574-1576 (lines=3) @@
|
| 1571 |
|
} |
| 1572 |
|
} |
| 1573 |
|
|
| 1574 |
|
if (!$this->allowPutMime($mime) || ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) { |
| 1575 |
|
return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME); |
| 1576 |
|
} |
| 1577 |
|
|
| 1578 |
|
$tmpsize = sprintf('%u', filesize($tmpname)); |
| 1579 |
|
if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) { |
|
@@ 1785-1787 (lines=3) @@
|
| 1782 |
|
fclose($tp); |
| 1783 |
|
} |
| 1784 |
|
} |
| 1785 |
|
if (!$this->allowPutMime($mimeByName) || ($mime && $mime !== 'unknown' && !$this->allowPutMime($mime))) { |
| 1786 |
|
return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME); |
| 1787 |
|
} |
| 1788 |
|
|
| 1789 |
|
$this->clearcache(); |
| 1790 |
|
return $this->convEncOut($this->_filePutContents($this->convEncIn($path), $content)) ? $this->stat($path) : false; |