@@ 1586-1588 (lines=3) @@ | ||
1583 | } |
|
1584 | ||
1585 | $mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name); |
|
1586 | if ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName)) { |
|
1587 | return $this->setError(elFinder::ERROR_INVALID_NAME, $name); |
|
1588 | } |
|
1589 | ||
1590 | if (!($file = $this->file($hash))) { |
|
1591 | return $this->setError(elFinder::ERROR_FILE_NOT_FOUND); |
|
@@ 1690-1692 (lines=3) @@ | ||
1687 | } |
|
1688 | } |
|
1689 | ||
1690 | if (!$this->allowPutMime($mime) || ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) { |
|
1691 | return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME); |
|
1692 | } |
|
1693 | ||
1694 | $tmpsize = sprintf('%u', filesize($tmpname)); |
|
1695 | if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) { |
|
@@ 1901-1903 (lines=3) @@ | ||
1898 | fclose($tp); |
|
1899 | } |
|
1900 | } |
|
1901 | if (!$this->allowPutMime($mimeByName) || ($mime && $mime !== 'unknown' && !$this->allowPutMime($mime))) { |
|
1902 | return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME); |
|
1903 | } |
|
1904 | ||
1905 | $this->clearcache(); |
|
1906 | return $this->convEncOut($this->_filePutContents($this->convEncIn($path), $content)) ? $this->stat($path) : false; |