소스 검색

Set proper content type for file upload

JC Brand 7 년 전
부모
커밋
ddfe35b2c8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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'));
                 }
             });