Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Fix share btn
Browse filesPNG images are being uploaded as JPEG imgs
- share_btn.py +2 -2
share_btn.py
CHANGED
@@ -39,8 +39,8 @@ share_js = """async () => {
|
|
39 |
const res = await fetch(imgEl.src);
|
40 |
const blob = await res.blob();
|
41 |
const imgId = Date.now() % 200;
|
42 |
-
const fileName = `diffuse-the-rest-${{imgId}}.
|
43 |
-
return new File([blob], fileName, { type: 'image/
|
44 |
})
|
45 |
);
|
46 |
const urls = await Promise.all(files.map((f) => uploadFile(f)));
|
|
|
39 |
const res = await fetch(imgEl.src);
|
40 |
const blob = await res.blob();
|
41 |
const imgId = Date.now() % 200;
|
42 |
+
const fileName = `diffuse-the-rest-${{imgId}}.png`;
|
43 |
+
return new File([blob], fileName, { type: 'image/png' });
|
44 |
})
|
45 |
);
|
46 |
const urls = await Promise.all(files.map((f) => uploadFile(f)));
|