mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 14:10:53 +03:00
use lib for setting content-disposition for more correctness
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user