diff options
Diffstat (limited to 'php/upload.php')
-rw-r--r-- | php/upload.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/php/upload.php b/php/upload.php index b36a0f1..b22c3a8 100644 --- a/php/upload.php +++ b/php/upload.php @@ -3,23 +3,20 @@ require_once "database.php"; require_once "configuration.php"; session_start(); -echo 1; if (!isset( $_POST["filename"]) || !isset($_FILES["the_file"])) { error_log("someone tried to upload something impropperly"); http_response_code(400); exit(1); } -echo 2; $file=$_FILES["the_file"]; $filename=$_POST["filename"]; -$homedir=$_SESSION['user_object']; +$user=$_SESSION['user_object']; +$homedir=$user->home_directory; -echo 3; -$codename=$database->create_file_node($filename,"",$_SESSION['user_object']->home_directory); -echo $codename; +$codename=$database->create_file_node($filename,"",$homedir,$user); if($codename=="error") { error_log("could not create file_node in upload.php"); |