Fix file name when URL ends with slash

This commit is contained in:
Kumi 2020-09-04 10:22:36 +02:00
parent 382a167f2f
commit 89253078a3

View file

@ -9,6 +9,7 @@ function getFilename($url){
if ($tmp_name[1]) $realfilename = trim($tmp_name[1],'";\'');
} else {
$stripped_url = preg_replace('/\\?.*/', '', $url);
$stripped_url = preg_replace('/\\/$/', '', $stripped_url);
$realfilename = basename($stripped_url);
}