mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-02 03:19:56 +01:00
Mime-Type check can only work for the first chunk, further ones will always fail
This commit is contained in:
parent
ce393e0803
commit
1ea45e6591
@ -156,8 +156,8 @@ class File extends Etemplate\Widget
|
|||||||
$file['type'] = $type = Api\MimeMagic::analyze_file($file['tmp_name']);
|
$file['type'] = $type = Api\MimeMagic::analyze_file($file['tmp_name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mime check
|
// Mime check (can only work for the first chunk, further ones will always fail!)
|
||||||
if($mime)
|
if ($mime && (int)$_POST['resumableChunkNumber'] === 1)
|
||||||
{
|
{
|
||||||
$is_preg = $mime[0] == '/';
|
$is_preg = $mime[0] == '/';
|
||||||
if (!$is_preg && strcasecmp($mime,$type) ||
|
if (!$is_preg && strcasecmp($mime,$type) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user