aboutsummaryrefslogtreecommitdiff
path: root/_www/functions.ts
diff options
context:
space:
mode:
Diffstat (limited to '_www/functions.ts')
-rw-r--r--_www/functions.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/_www/functions.ts b/_www/functions.ts
index e5d2cf3..be8862b 100644
--- a/_www/functions.ts
+++ b/_www/functions.ts
@@ -48,12 +48,12 @@ export function generateFormInput(parent: HTMLElement, fi: FormInput) {
fi.value = "";
reader = new FileReader();
- reader.onload = (e) => {
- if (e) {
- fi.value = btoa(reader.result as string);
+ reader.onload = (ev) => {
+ if (ev && ev.target) {
+ fi.value = reader.result as string;
}
};
- reader.readAsText(file);
+ reader.readAsBinaryString(file);
};
parent.appendChild(wuiInputFile.element());
break;