mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
src build elFinder-2.1-a544082
This commit is contained in:
@@ -1762,7 +1762,8 @@ abstract class elFinderVolumeDriver {
|
||||
// check MIME
|
||||
$name = $this->basenameCE($path);
|
||||
$mime = '';
|
||||
if ($this->mimeDetect != 'internal') {
|
||||
$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name);
|
||||
if ($this->mimeDetect !== 'internal') {
|
||||
if ($tp = tmpfile()) {
|
||||
fwrite($tp, $content);
|
||||
$info = stream_get_meta_data($tp);
|
||||
@@ -1771,10 +1772,7 @@ abstract class elFinderVolumeDriver {
|
||||
fclose($tp);
|
||||
}
|
||||
}
|
||||
if (!$mime) {
|
||||
$mime = $this->mimetype($name);
|
||||
}
|
||||
if (!$this->allowPutMime($mime)) {
|
||||
if (!$this->allowPutMime($mimeByName) || ($mime && $mime !== 'unknown' && !$this->allowPutMime($mime))) {
|
||||
return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user