Closed AIR-FRAME closed 3 years ago
You can provide your own content type function and set whichever content type you want. I believe that file-type is having a hard time detecting the HTML because it's just a text file and doesn't have any signature of magic bytes...
function autoContentType (req, file, cb) { file.stream.once('data', function (firstChunk) { var type = fileType(firstChunk) var mime console.log(type); //This type returns null when I upload html file so it saves as application/octet-stream.