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 (isset($headers['content-disposition'])) {
|
||||||
if (preg_match('/filename="([^"]+)"/', $headers['content-disposition'], $matches)) {
|
if (preg_match('/filename="([^"]+)"/', $headers['content-disposition'], $matches)) {
|
||||||
$fileName = $matches[1];
|
$fileName = $matches[1];
|
||||||
|
return $fileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return basename($path);
|
||||||
if (!$fileName) {
|
|
||||||
$fileName = basename($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $fileName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue