aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/css/files.css2
-rw-r--r--src/main/resources/fonts/ionicons .eotbin112662 -> 0 bytes
-rw-r--r--src/main/resources/js/files.js14
3 files changed, 11 insertions, 5 deletions
diff --git a/src/main/resources/css/files.css b/src/main/resources/css/files.css
index d03e092..c7302bf 100644
--- a/src/main/resources/css/files.css
+++ b/src/main/resources/css/files.css
@@ -58,7 +58,7 @@ colgroup col:nth-child(5) {
.drop {
padding: 8px;
- min-height: calc(100vmin - 16px);
+ min-height: calc(100vh - 16px);
z-index: -1;
}
diff --git a/src/main/resources/fonts/ionicons .eot b/src/main/resources/fonts/ionicons .eot
deleted file mode 100644
index 671df91..0000000
--- a/src/main/resources/fonts/ionicons .eot
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/js/files.js b/src/main/resources/js/files.js
index 28d091b..ea90f3b 100644
--- a/src/main/resources/js/files.js
+++ b/src/main/resources/js/files.js
@@ -15,7 +15,6 @@ drop.addEventListener('dragleave', () =>
);
drop.addEventListener('drop', e => {
- // TODO: Fix directory uploading
e.stopPropagation();
e.preventDefault();
drop.style.background = "white";
@@ -38,9 +37,16 @@ drop.addEventListener('drop', e => {
setListeners();
- formData.append("file", file);
- request.open("POST", "/upload/" + path);
- request.send(formData);
+ const reader = new FileReader();
+ reader.onload = () => {
+ formData.append("file", file);
+ request.open("POST", "/upload/" + path);
+ request.send(formData);
+ };
+ reader.onerror = () => {
+ // TODO: Add uploading of directories
+ };
+ reader.readAsText(file)
}
function bytesToSize(bytes) {