aboutsummaryrefslogtreecommitdiff
path: root/src/mobile/ImageUpload.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/mobile/ImageUpload.tsx')
-rw-r--r--src/mobile/ImageUpload.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mobile/ImageUpload.tsx b/src/mobile/ImageUpload.tsx
index 9fdaac66e..ec698b151 100644
--- a/src/mobile/ImageUpload.tsx
+++ b/src/mobile/ImageUpload.tsx
@@ -34,13 +34,13 @@ class Uploader extends React.Component {
try {
this.status = "initializing protos";
await Docs.Prototypes.initialize();
- let imgPrev = document.getElementById("img_preview");
+ const imgPrev = document.getElementById("img_preview");
if (imgPrev) {
- let files: FileList | null = inputRef.current!.files;
+ const files: FileList | null = inputRef.current!.files;
if (files && files.length !== 0) {
console.log(files[0]);
const name = files[0].name;
- let formData = new FormData();
+ const formData = new FormData();
formData.append("file", files[0]);
const upload = window.location.origin + "/upload";
@@ -52,8 +52,8 @@ class Uploader extends React.Component {
this.status = "upload image, getting json";
const json = await res.json();
json.map(async (file: any) => {
- let path = window.location.origin + file;
- var doc = Docs.Create.ImageDocument(path, { nativeWidth: 200, width: 200, title: name });
+ const path = window.location.origin + file;
+ const doc = Docs.Create.ImageDocument(path, { nativeWidth: 200, width: 200, title: name });
this.status = "getting user document";