Fix file name when URL ends with slash
This commit is contained in:
parent
382a167f2f
commit
89253078a3
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue