From 6a234561102f13eb3e80d83acbc18d94f792e246 Mon Sep 17 00:00:00 2001 From: Fascinated Date: Sat, 15 Apr 2023 19:47:36 +0100 Subject: [PATCH] fix sillyness --- upload.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/upload.php b/upload.php index 61d9ca3..f6cdf3c 100644 --- a/upload.php +++ b/upload.php @@ -36,7 +36,7 @@ try { $map = $_FILES["map"]; // the file to upload if (!isset($map)) { // if the file is not set - header("Location: /?map=No file was uploaded"); + header("Location: /?map=" . urlencode("No file was uploaded")); die(); } @@ -45,12 +45,12 @@ try { $size = $map["size"]; // the size of the file if ($size > 100000000) { // if the file is larger than 100MB - header("Location: /?map=File is too large"); + header("Location: /?map=" . urlencode("File is too large. Max file size is 100MB")); die(); } if (!isValidBeatSaberMap($file)) { - header("Location: /?map=This is not a valid BeatSaber map"); + header("Location: /?map=" . urlencode("File is not a valid BeatSaber map. Please make sure you are uploading a .zip file")); die(); } @@ -76,7 +76,7 @@ try { $target_file = $target_dir . $mapId . ".zip"; // the output file path if (!move_uploaded_file($file, $target_file)) { error_log("Error: Failed to move uploaded file from $file to $target_file"); - header("Location: /?map=Failed to upload file"); + header("Location: /?map=" . urlencode("Failed to upload file. If this error persists, please contact me on Discord: Fascinated#7668")); die(); }