feat: adjustment on function `get_file_name_from_url` #929
This commit is contained in:
parent
77ef02650b
commit
99f404fe3d
|
@ -64,14 +64,10 @@ class Media {
|
|||
if (isset($headers['content-disposition'])) {
|
||||
if (preg_match('/filename="([^"]+)"/', $headers['content-disposition'], $matches)) {
|
||||
$fileName = $matches[1];
|
||||
return $fileName;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$fileName) {
|
||||
$fileName = basename($path);
|
||||
}
|
||||
|
||||
return $fileName;
|
||||
return basename($path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue