Jelajahi Sumber

Set proper content type for file upload

JC Brand 7 tahun lalu
induk
melakukan
ddfe35b2c8
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/converse-chatboxes.js

+ 1 - 1
src/converse-chatboxes.js

@@ -225,7 +225,7 @@
                         });
                     };
                     xhr.open('PUT', this.get('put'), true);
-                    xhr.setRequestHeader("Content-type", 'application/octet-stream');
+                    xhr.setRequestHeader("Content-type", this.get('file').type);
                     xhr.send(this.get('file'));
                 }
             });