multimodalart HF staff commited on
Commit
7e646c6
1 Parent(s): fdf6122

Update share_btn.py

Browse files
Files changed (1) hide show
  1. share_btn.py +3 -0
share_btn.py CHANGED
@@ -11,6 +11,9 @@ loading_icon_html = """<svg id="share-btn-loading-icon" style="display:none;" cl
11
  share_js = """async () => {
12
  async function uploadFile(file){
13
  const UPLOAD_URL = 'https://huggingface.co/uploads';
 
 
 
14
  const response = await fetch(UPLOAD_URL, {
15
  method: 'POST',
16
  headers: {
 
11
  share_js = """async () => {
12
  async function uploadFile(file){
13
  const UPLOAD_URL = 'https://huggingface.co/uploads';
14
+ if(file.type == ""):
15
+ file.type = "webp"
16
+ console.log(file.type)
17
  const response = await fetch(UPLOAD_URL, {
18
  method: 'POST',
19
  headers: {