F diff --git a/loggedin.js b/loggedin.js
--- a/loggedin.js
+++ b/loggedin.js
+ var FORM_ASYNC = false;
+
const upload_form = document.getElementById("upload_form");
const the_file = document.getElementById("the_file");
const filename_input = document.getElementById("filename");
if (the_file.files.length >= 1) {
filename_input.value = the_file.files[0].name;
+ if (!FORM_ASYNC) {
+ upload_form.submit();
+ return;
+ }
+
// Send the form asynchronously through the fetch api
fetch(upload_form.action, {
method: upload_form.method,
F diff --git a/php/.database.php.swp b/php/.database.php.swp
new file mode 100644
B Binary files /dev/null and b/php/.database.php.swp differ
F diff --git a/php/.node.php.swp b/php/.node.php.swp
new file mode 100644
B Binary files /dev/null and b/php/.node.php.swp differ
F diff --git a/php/.upload.php.swp b/php/.upload.php.swp
new file mode 100644
B Binary files /dev/null and b/php/.upload.php.swp differ
F diff --git a/php/node.php b/php/node.php
--- a/php/node.php
+++ b/php/node.php
<?php
require_once "database.php";
- class Node
- {
- public $node_id;
- public $is_directory;
- public $relative_path;
- public $type;
- public $name;
- public $note;
- function __construct($node_id)
- {
- $this->node_id=$node_id;
- }
- }
class Current_Directory
{
+ public $node_id;
/*an array of the dir_ids taken to reach here*/
public $path;
F diff --git a/php/upload.php b/php/upload.php
--- a/php/upload.php
+++ b/php/upload.php
<?php
- require_once "database.php";
- require_once "configuration.php";
+ require_once "database.php"
+ require_once "configuration.php"
- if (!isset( $_POST["filename"]) || !isset($_POST["the_file"]))
+ if (!isset( $_POST["filename") || !isset($_POST["the_file"])
{
http_response_code(400);
error_log("someone tried to upload something impropperly");
F diff --git a/sql/.fileshare.sql.swp b/sql/.fileshare.sql.swp
new file mode 100644
B Binary files /dev/null and b/sql/.fileshare.sql.swp differ