Spaces:
Running
Running
Update lib/uploader.js
Browse files- lib/uploader.js +1 -1
lib/uploader.js
CHANGED
@@ -10,7 +10,7 @@ async function Uploader(input) {
|
|
10 |
const resp = await fetch(input);
|
11 |
const images = await resp.arrayBuffer();
|
12 |
const types = await fileTypeFromBuffer(images);
|
13 |
-
const filenames = "images_" + Math.floor(1000 + Math.random() * 9000) + "." types.ext;
|
14 |
// memasukan data ke formdata
|
15 |
const form = new FormData();
|
16 |
form.append("image", Buffer.from(images, "binary"), {
|
|
|
10 |
const resp = await fetch(input);
|
11 |
const images = await resp.arrayBuffer();
|
12 |
const types = await fileTypeFromBuffer(images);
|
13 |
+
const filenames = "images_" + Math.floor(1000 + Math.random() * 9000) + "." + types.ext;
|
14 |
// memasukan data ke formdata
|
15 |
const form = new FormData();
|
16 |
form.append("image", Buffer.from(images, "binary"), {
|