Browse Source

Only set a default MIME type if not a blob response type

Kevan Stannard 8 years ago
parent
commit
1645d31907
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/loaders/FileLoader.js

+ 7 - 1
src/loaders/FileLoader.js

@@ -184,7 +184,13 @@ Object.assign( FileLoader.prototype, {
 			if ( this.responseType !== undefined ) request.responseType = this.responseType;
 			if ( this.withCredentials !== undefined ) request.withCredentials = this.withCredentials;
 
-			if ( request.overrideMimeType ) request.overrideMimeType( this.mimeType !== undefined ? this.mimeType : 'text/plain' );
+			if ( ! this.mimeType && this.responseType !== 'blob' ) {
+
+				this.setMimeType( 'text/plain' );
+
+			}
+
+			if ( this.mimeType && request.overrideMimeType ) request.overrideMimeType( this.mimeType );
 
 			request.send( null );