Accept additional mime types that can represent a zip file

This commit is contained in:
mmcwilliams 2023-12-15 14:44:53 -05:00
parent b28e1fa616
commit ad1a364de2
3 changed files with 16 additions and 3 deletions

8
dist/index.js vendored
View File

@ -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);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -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) {