diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-03 01:46:36 -0500 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-03 01:46:36 -0500 |
commit | ef94ad7df2a087141ddb8d347d3e3c484ff7609b (patch) | |
tree | a7c16be04ff4050da1ff03e02f59df6da4f5f7e2 /src/mobile/ImageUpload.tsx | |
parent | 62c888ad25c5580441eaf947a1a0f1638939b868 (diff) |
const linter rule and restored google docs push, fixed routing
Diffstat (limited to 'src/mobile/ImageUpload.tsx')
-rw-r--r-- | src/mobile/ImageUpload.tsx | 10 |
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"; |