diff options
author | Raccoon Li | 2017-05-08 20:04:05 +0800 |
---|---|---|
committer | Raccoon Li | 2017-05-08 20:04:05 +0800 |
commit | d79997808a224cdfe6a4f3fbc76c1b1e9afc3b87 (patch) | |
tree | 6078c6ffe108a2669bc19e5e52c8fa3e1d4f360f | |
parent | 60ca6ed56cc896acb0fd9650377ebfc6d0e6c486 (diff) |
fix(imageRouter): import missing dependency: getImageMimeType
-rw-r--r-- | app.js | 3 | ||||
-rw-r--r-- | lib/web/imageRouter.js | 2 |
2 files changed, 1 insertions, 4 deletions
@@ -19,9 +19,6 @@ var helmet = require('helmet') var i18n = require('i18n') var flash = require('connect-flash') -// utils -var getImageMimeType = require('./lib/utils.js').getImageMimeType - // core var config = require('./lib/config') var logger = require('./lib/logger') diff --git a/lib/web/imageRouter.js b/lib/web/imageRouter.js index 7a3819c5..592a497c 100644 --- a/lib/web/imageRouter.js +++ b/lib/web/imageRouter.js @@ -42,7 +42,7 @@ imageRouter.post('/uploadimage', function (req, res) { var AWS = require('aws-sdk') var awsConfig = new AWS.Config(config.s3) var s3 = new AWS.S3(awsConfig) - + const {getImageMimeType} = require('../utils') fs.readFile(files.image.path, function (err, buffer) { if (err) { logger.error(err) |