diff --git a/src/loaders/FileLoader.js b/src/loaders/FileLoader.js index 32e7de42f9f784..2fb06a8301e0ac 100644 --- a/src/loaders/FileLoader.js +++ b/src/loaders/FileLoader.js @@ -184,7 +184,7 @@ 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( 'text/plain' ); + if ( request.overrideMimeType ) request.overrideMimeType( this.mimeType !== undefined ? this.mimeType : 'text/plain' ); request.send( null ); @@ -215,6 +215,13 @@ Object.assign( FileLoader.prototype, { this.withCredentials = value; return this; + }, + + setMimeType: function ( value ) { + + this.mimeType = value; + return this; + } } );