diff options
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/css/files.css | 2 | ||||
-rw-r--r-- | src/main/resources/fonts/ionicons .eot | bin | 112662 -> 0 bytes | |||
-rw-r--r-- | src/main/resources/js/files.js | 14 |
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 Binary files differdeleted file mode 100644 index 671df91..0000000 --- a/src/main/resources/fonts/ionicons .eot +++ /dev/null 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) { |