aboutsummaryrefslogtreecommitdiffstats
path: root/php/upload.php
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-02-12 20:58:46 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-02-12 20:58:46 +0200
commit97e8088dbc74d958e7f427abf24a84d5938b42c1 (patch)
treeef6aa537d39b861d0c8f58a4880bc685e5ebe345 /php/upload.php
parent1813442cb9d565641ee0a67f6491b47327cef69b (diff)
parent022e478554fdb7110f3029fab49f706ba1d893ad (diff)
downloadfileup-97e8088dbc74d958e7f427abf24a84d5938b42c1.tar.gz
Merge branch 'master' of https://github.com/alexvitkov/india
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);