From 0d3f0a9788bdb4e7e4a725052c592fe0137b9a7c Mon Sep 17 00:00:00 2001 From: somebody Date: Sat, 12 Nov 2022 15:03:36 -0600 Subject: [PATCH] Upload fixes --- static/koboldai.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/static/koboldai.js b/static/koboldai.js index 47f1e3e3..3400c4dc 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -1856,7 +1856,7 @@ function world_info_entry(data) { const wiImgContainer = world_info_card.querySelector(".world_info_image_container"); const wiImg = wiImgContainer.querySelector(".world_info_image"); const wiImgPlaceholder = wiImgContainer.querySelector(".placeholder"); - const wiImgInput = $e("input", null, {type: "file"}); + const wiImgInput = $e("input", null, {type: "file", accept: "image/png,image/x-png,image/gif,image/jpeg"}); console.log(data.image) @@ -1887,14 +1887,12 @@ function world_info_entry(data) { let reader = new FileReader(); reader.addEventListener("loadend", async function() { - console.log(reader.result) let r = await fetch(`/set_wi_image/${data.uid}`, { method: "POST", body: reader.result }); }); reader.readAsDataURL(file); - console.log(file) }); tags = world_info_card.querySelector('.world_info_tag_primary_area');