mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-31 07:11:33 +00:00
fix: url uploads content-type parsing
This commit is contained in:
parent
3d51fd2e31
commit
066998991c
@ -707,7 +707,7 @@ self.actuallyUploadUrls = async (req, res, data = {}) => {
|
||||
|
||||
// Finalize other file props
|
||||
const contentType = fetchFile.headers.get('content-type')
|
||||
file.mimetype = contentType ? contentType.split(';')[0] : 'application/octet-stream'
|
||||
file.mimetype = (contentType && contentType.split(';')[0]) || 'application/octet-stream'
|
||||
file.size = writeStream.bytesWritten
|
||||
file.hash = hashStream
|
||||
? hashStream.digest('hex')
|
||||
|
Loading…
Reference in New Issue
Block a user