From 0c3d535a341dcefd702982715f6d20275a0f512d Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 12 Feb 2021 16:40:24 +0200 Subject: stuff --- php/upload.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'php/upload.php') 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); } -- cgit v1.2.3