aboutsummaryrefslogtreecommitdiffstats
path: root/php/upload.php
diff options
context:
space:
mode:
authoradam <adam@>2021-02-12 16:40:24 +0200
committeradam <adam@>2021-02-12 16:40:24 +0200
commit0c3d535a341dcefd702982715f6d20275a0f512d (patch)
treebdc6249da1f2d6d4a7975d192537511017df9354 /php/upload.php
parent75640897d7ae44f10b9dde091d4b8dcba8e23776 (diff)
downloadfileup-0c3d535a341dcefd702982715f6d20275a0f512d.tar.gz
stuff
Diffstat (limited to 'php/upload.php')
-rw-r--r--php/upload.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/php/upload.php b/php/upload.php
index 01ab6a6..55ff4a4 100644
--- a/php/upload.php
+++ b/php/upload.php
@@ -2,20 +2,25 @@
require_once "database.php";
require_once "configuration.php";
+echo 1;
if (!isset( $_POST["filename"]) || !isset($_FILES["the_file"]))
{
- http_response_code(400);
error_log("someone tried to upload something impropperly");
+ http_response_code(400);
exit(1);
}
+echo 2;
-$file = $_FILES["the_file"];
-$filename= $_POST["filename"];
+$file=$_FILES["the_file"];
+$filename=$_POST["filename"];
+echo 3;
$codename=$database->create_file_node($filename);
+echo $codename;
if($codename=="error")
{
+ error_log("could not create file_node in upload.php");
http_response_code(400);
exit(0);
}