diff options
author | adam <adam@> | 2021-02-12 19:54:52 +0200 |
---|---|---|
committer | adam <adam@> | 2021-02-12 19:54:52 +0200 |
commit | af0c31ec0ebbfabd3f6140b816752ccf96313225 (patch) | |
tree | ea9d230d03e82b485c588d424aced2862dbe587f /php/upload.php | |
parent | fd807f7df9ab0b3021e071eb0ff4be6e252938a8 (diff) | |
download | fileup-af0c31ec0ebbfabd3f6140b816752ccf96313225.tar.gz |
mimetype draft
Diffstat (limited to 'php/upload.php')
-rw-r--r-- | php/upload.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/php/upload.php b/php/upload.php index b22c3a8..ee5d1ae 100644 --- a/php/upload.php +++ b/php/upload.php @@ -1,6 +1,7 @@ <?php require_once "database.php"; require_once "configuration.php"; +require_once "file_type_recogniser.php"; session_start(); if (!isset( $_POST["filename"]) || !isset($_FILES["the_file"])) @@ -14,9 +15,10 @@ $file=$_FILES["the_file"]; $filename=$_POST["filename"]; $user=$_SESSION['user_object']; $homedir=$user->home_directory; +$mimetype=file_type($file['tmp_name']); -$codename=$database->create_file_node($filename,"",$homedir,$user); +$codename=$database->create_file_node($filename,"",$homedir,$mimetype,$user); if($codename=="error") { error_log("could not create file_node in upload.php"); |