aboutsummaryrefslogtreecommitdiffstats
path: root/php/upload.php
diff options
context:
space:
mode:
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);
}