Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
df2ad60
1
Parent(s):
ea90207
Fix share btn (#7196)
Browse files- Fix share btn (3cf7906adbb121f88193fc8572883f89188d4b2f)
Co-authored-by: Mishig Davaadorj <mishig@users.noreply.huggingface.co>
- 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)));
|