feat: adjustment on function `get_file_name_from_url` #929

This commit is contained in:
vnmedeiros 2024-11-05 16:16:21 -03:00
parent 77ef02650b
commit 99f404fe3d
1 changed files with 2 additions and 6 deletions

View File

@ -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);
}
/**