From d79997808a224cdfe6a4f3fbc76c1b1e9afc3b87 Mon Sep 17 00:00:00 2001 From: Raccoon Li Date: Mon, 8 May 2017 20:04:05 +0800 Subject: fix(imageRouter): import missing dependency: getImageMimeType --- app.js | 3 --- lib/web/imageRouter.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app.js b/app.js index 66329f39..ccb75da7 100644 --- a/app.js +++ b/app.js @@ -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) -- cgit v1.2.3