fix(imageRouter): import missing dependency: getImageMimeType
This commit is contained in:
parent
60ca6ed56c
commit
d79997808a
2 changed files with 1 additions and 4 deletions
3
app.js
3
app.js
|
@ -19,9 +19,6 @@ var helmet = require('helmet')
|
||||||
var i18n = require('i18n')
|
var i18n = require('i18n')
|
||||||
var flash = require('connect-flash')
|
var flash = require('connect-flash')
|
||||||
|
|
||||||
// utils
|
|
||||||
var getImageMimeType = require('./lib/utils.js').getImageMimeType
|
|
||||||
|
|
||||||
// core
|
// core
|
||||||
var config = require('./lib/config')
|
var config = require('./lib/config')
|
||||||
var logger = require('./lib/logger')
|
var logger = require('./lib/logger')
|
||||||
|
|
|
@ -42,7 +42,7 @@ imageRouter.post('/uploadimage', function (req, res) {
|
||||||
var AWS = require('aws-sdk')
|
var AWS = require('aws-sdk')
|
||||||
var awsConfig = new AWS.Config(config.s3)
|
var awsConfig = new AWS.Config(config.s3)
|
||||||
var s3 = new AWS.S3(awsConfig)
|
var s3 = new AWS.S3(awsConfig)
|
||||||
|
const {getImageMimeType} = require('../utils')
|
||||||
fs.readFile(files.image.path, function (err, buffer) {
|
fs.readFile(files.image.path, function (err, buffer) {
|
||||||
if (err) {
|
if (err) {
|
||||||
logger.error(err)
|
logger.error(err)
|
||||||
|
|
Loading…
Reference in a new issue