fix(imageRouter): import missing dependency: getImageMimeType

This commit is contained in:
Raccoon Li 2017-05-08 20:04:05 +08:00
parent 60ca6ed56c
commit d79997808a
2 changed files with 1 additions and 4 deletions

3
app.js
View file

@ -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')

View file

@ -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)