Accept additional mime types that can represent a zip file
This commit is contained in:
parent
b28e1fa616
commit
ad1a364de2
|
@ -49,7 +49,13 @@ const app = (0, express_1.default)();
|
|||
const tmp = (0, os_1.tmpdir)();
|
||||
const db = new sqlite3_1.Database(dbPath);
|
||||
let log = (0, log_1.createLog)('server');
|
||||
const accepted = ['application/zip', 'application/x-zip-compressed'];
|
||||
const accepted = [
|
||||
'application/octet-stream',
|
||||
'multipart/x-zip',
|
||||
'application/zip',
|
||||
'application/zip-compressed',
|
||||
'application/x-zip-compressed',
|
||||
];
|
||||
const storage = multer_1.default.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
cb(null, tmp);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,14 @@ const tmp : string = tmpdir();
|
|||
const db : Database = new Database(dbPath);
|
||||
let log : Logger = createLog('server');
|
||||
|
||||
const accepted : string[] = ['application/zip', 'application/x-zip-compressed'];
|
||||
const accepted : string[] = [
|
||||
'application/octet-stream',
|
||||
'multipart/x-zip',
|
||||
'application/zip',
|
||||
'application/zip-compressed',
|
||||
'application/x-zip-compressed',
|
||||
|
||||
];
|
||||
|
||||
const storage = multer.diskStorage({
|
||||
destination: function (req : any, file : any, cb : any) {
|
||||
|
|
Loading…
Reference in New Issue