feat: defaults mime-type to octet-stream

This commit is contained in:
Bobby 2022-09-28 10:14:57 +07:00
parent c1bb2f5015
commit 81c94a40d5
No known key found for this signature in database
GPG Key ID: 941839794CBF5A09

View File

@ -369,7 +369,7 @@ self.actuallyUpload = async (req, res, data = {}) => {
albumid: data.albumid,
age: data.age,
originalname: field.file.name || '',
mimetype: field.mime_type || '',
mimetype: field.mime_type || 'application/octet-stream'
}
req.files.push(file)
@ -879,7 +879,7 @@ self.actuallyFinishChunks = async (req, res, files) => {
filename: name,
originalname: file.original || '',
extname,
mimetype: file.type || '',
mimetype: file.type || 'application/octet-stream',
path: destination,
size,
hash,