Skip to content

Commit

Permalink
Add setOverrideMimeType() to XHRLoader (#9959)
Browse files Browse the repository at this point in the history
* Add setOverrideMimeType() to XHRLoader

* Rename setOverrideMimeType with setMimeType of FileLoader
  • Loading branch information
takahirox authored and mrdoob committed Nov 2, 2016
1 parent 916a1b6 commit 0d47a62
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/loaders/FileLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down Expand Up @@ -215,6 +215,13 @@ Object.assign( FileLoader.prototype, {
this.withCredentials = value;
return this;

},

setMimeType: function ( value ) {

this.mimeType = value;
return this;

}

} );
Expand Down

0 comments on commit 0d47a62

Please sign in to comment.