xhr download as octet-stream

This commit is contained in:
Danny Coates 2017-08-17 10:19:18 -07:00
parent a1d0eef8a5
commit e9405f49ee
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
3 changed files with 2 additions and 4 deletions

View file

@ -38,14 +38,13 @@ export default class FileReceiver extends EventEmitter {
}
const blob = new Blob([this.response]);
const type = xhr.getResponseHeader('Content-Type');
const meta = JSON.parse(xhr.getResponseHeader('X-File-Metadata'));
const fileReader = new FileReader();
fileReader.onload = function() {
resolve({
data: this.result,
name: meta.filename,
type,
type: meta.mimeType,
iv: meta.id
});
};