aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server/public/js/transfer.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-01 11:07:57 +0000
committerLibravatar GitHub <noreply@github.com>2021-08-01 16:37:57 +0530
commit419933f6505caf4c5e685f8436b1ff735185e55a (patch)
tree152dcb9d2b35d29f862cc57a605b9ae2a0f7c300 /src/internal-server/public/js/transfer.js
parentRemoved duplicated contributors badge. (diff)
downloadferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.tar.gz
ferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.tar.zst
ferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.zip
Moved 'internal-server' into a sub-folder as opposed to a git submodule. (#1715)
* Ignored tests in 'internal-server' folder since there are none. * Linter fixes
Diffstat (limited to 'src/internal-server/public/js/transfer.js')
-rw-r--r--src/internal-server/public/js/transfer.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/internal-server/public/js/transfer.js b/src/internal-server/public/js/transfer.js
new file mode 100644
index 000000000..c04a6d3b1
--- /dev/null
+++ b/src/internal-server/public/js/transfer.js
@@ -0,0 +1,14 @@
1/* eslint-env browser */
2const submitBtn = document.getElementById('submit');
3const fileInput = document.getElementById('file');
4const fileOutput = document.getElementById('fileoutput');
5
6fileInput.addEventListener('change', () => {
7 const reader = new FileReader();
8 reader.onload = function () {
9 const text = reader.result;
10 fileOutput.value = text;
11 submitBtn.disabled = false;
12 };
13 reader.readAsText(fileInput.files[0]);
14});