use lib for setting content-disposition for more correctness
This commit is contained in:
parent
f12d3abe79
commit
282cf0b595
@ -1,6 +1,7 @@
|
||||
import Keychain from './keychain';
|
||||
import { downloadStream } from './api';
|
||||
import { transform } from './streams';
|
||||
import contentDisposition from 'content-disposition';
|
||||
|
||||
let noSave = false;
|
||||
const map = new Map();
|
||||
@ -32,7 +33,7 @@ async function decryptStream(request) {
|
||||
const decrypted = keychain.decryptStream(readStream);
|
||||
|
||||
const headers = {
|
||||
'Content-Disposition': 'attachment; filename=' + file.filename,
|
||||
'Content-Disposition': contentDisposition(file.filename),
|
||||
'Content-Type': file.type,
|
||||
'Content-Length': file.size
|
||||
};
|
||||
|
@ -67,6 +67,7 @@
|
||||
"babel-preset-stage-2": "^6.24.1",
|
||||
"babel-preset-stage-3": "^6.24.1",
|
||||
"base64-js": "^1.3.0",
|
||||
"content-disposition": "^0.5.2",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
"cross-env": "^5.2.0",
|
||||
"css-loader": "^1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user