diff --git a/helpers.php b/helpers.php index 9e8d27a..6f56e48 100644 --- a/helpers.php +++ b/helpers.php @@ -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); }