FILEUP



LOG | FILES | OVERVIEW


F diff --git a/loggedin.js b/loggedin.js --- a/loggedin.js +++ b/loggedin.js
f.visuals.remove();
files = [];
+ alert(this.responseText);
var json = JSON.parse(this.responseText);
for (const f of json) {
add_file_visuals(f.name, f.is_directory, f.mimetype);
F diff --git a/php/database.php b/php/database.php --- a/php/database.php +++ b/php/database.php
node_links.name as name,
node_links.note as note,
nodes.is_directory as is_directory,
- nodes.code as code
+ nodes.code as code,
+ nodes.type as mimetype
from node_links
inner join nodes on
nodes.node_id=node_links.node_id
F diff --git a/php/readdir.php b/php/readdir.php --- a/php/readdir.php +++ b/php/readdir.php
$user=$_SESSION["user_object"];
//echo '[ { "name": "file1.txt", "mimetype": "text/plain", "is_directory": false }, { "name": "file2.pdf", "mimetype": "application/pdf", "is_directory": false }, { "name": "dir", "mimetype": "", "is_directory": true } ] ';
- echo get_directory("/",$user);
- error_log(print_r(get_directory("/",$user)).gettype(get_directory("/",$user)));
+ $ret=get_directory("/",$user);
+ $json=json_encode($ret);
+ echo $json;
?>