From aa5d33b636cb61062e97746a90a23bea78a32c91 Mon Sep 17 00:00:00 2001 From: xfnw Date: Wed, 11 Nov 2020 14:40:57 -0500 Subject: [PATCH] more helpful messages --- u.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/u.php b/u.php index 3c8aabc..a0faa39 100644 --- a/u.php +++ b/u.php @@ -45,17 +45,14 @@ $target_file = $target_dir . substr(md5_file($_FILES['file']['tmp_name']), 1, 6) if (file_exists($_FILES["file"]['tmp_name'])) { $uploadOk = 1; + } -// Check if file already exists -if (file_exists($target_file)) { - //echo "Whoops! someone already uploaded that, " . $target_file; - $uploadOk = 0; -} // Check file size if ($_FILES["file"]["size"] > 600000000) { - //echo "Sorry, your file is too large. (maximum size allowed 6mb)"; + echo "Your file is too large."; $uploadOk = 0; + exit; } // Check if $uploadOk is set to 0 by an error @@ -84,7 +81,7 @@ if ($uploadOk == 0) {

xfnw's upload thing

-

files are regularly automatically deleted, and will probably be gone in 6 hours if not sooner

+

files are regularly automatically deleted, and will probably be gone in 6 hours

 # upload function