mishig HF staff commited on
Commit
3cf7906
1 Parent(s): ea90207

Fix share btn

Browse files

PNG images are being uploaded as JPEG imgs

Files changed (1) hide show
  1. 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}}.jpg`;
43
- return new File([blob], fileName, { type: 'image/jpeg' });
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)));