aboutsummaryrefslogtreecommitdiffstats
path: root/php/upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/upload.php')
-rw-r--r--php/upload.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/php/upload.php b/php/upload.php
index ee5d1ae..1672e9e 100644
--- a/php/upload.php
+++ b/php/upload.php
@@ -25,6 +25,11 @@ if($codename=="error")
http_response_code(400);
exit(0);
}
+if($codename=="filename taken")
+{
+ http_response_code(409);
+ exit(0);
+}
move_uploaded_file($file['tmp_name'], "$storage_root/$codename");
http_response_code(200);