Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
Address numerous security fixes
Browse files Browse the repository at this point in the history
These are the easier ones that `npm audit fix` was able to do for us.
  • Loading branch information
mjs committed Jun 28, 2018
1 parent a4db3b9 commit 64d52a3
Show file tree
Hide file tree
Showing 3 changed files with 471 additions and 773 deletions.
4 changes: 2 additions & 2 deletions models/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function processVideo(file) {
function getMetadataFromFile(filePath, fileName) {
return new Promise(function(resolve) {
var size = fs.statSync(filePath).size || 0;
var mimeType = mime.lookup(fileName || filePath);
var mimeType = mime.getType(fileName || filePath);
var extname = path.extname(filePath) || '';
var fileData = {
path: filePath,
Expand Down Expand Up @@ -153,7 +153,7 @@ function getFileName(model) {
else
{fileName = 'file';}

var ext = mime.extension(model.getDataValue('mimeType') || '');
var ext = mime.getExtension(model.getDataValue('mimeType') || '');
if (ext) {fileName = fileName + '.' + ext;}
return fileName;
}
Expand Down
Loading

0 comments on commit 64d52a3

Please sign in to comment.