From 581d69f4cc57c9acf51913119d76cae19fdfeaac Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Wed, 16 Aug 2017 20:28:48 +0100 Subject: URL encode the URL with rawurlencode() when using it --- upload_file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upload_file.php') diff --git a/upload_file.php b/upload_file.php index f1ed597..acf8c89 100755 --- a/upload_file.php +++ b/upload_file.php @@ -48,7 +48,7 @@ if ($_FILES["file"]["error"] > 0) { } else { move_uploaded_file($_FILES["file"]["tmp_name"], "./" . $_FILES["file"]["name"]); echo "Uploaded: " . $_FILES["file"]["name"] . "
"; - $fileurl = "$url" . $_FILES["file"]["name"]; + $fileurl = "$url" . rawurlencode($_FILES["file"]["name"]); echo "URL: $fileurl
"; echo "Size: " . size_readable($_FILES["file"]["size"], null, "bi"); if (isset($posturl)) { -- cgit v1.2.3