summaryrefslogtreecommitdiff
path: root/lib/web/imageRouter/s3.js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-06-01 14:31:44 +0200
committerGitHub2018-06-01 14:31:44 +0200
commit94e015dde7127647f0533f2580c6b7c406c5a759 (patch)
tree839926c5367ac8b64f18f00c906e5be3f61e9b78 /lib/web/imageRouter/s3.js
parent2ed2a08f6603cfdd144a4be9cfab0653f5e887d5 (diff)
parentb5574466cd715f1bfde156d5622e6d03c4f8405f (diff)
Merge pull request #833 from ahoka/callback
Fix callback validation
Diffstat (limited to 'lib/web/imageRouter/s3.js')
-rw-r--r--lib/web/imageRouter/s3.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/web/imageRouter/s3.js b/lib/web/imageRouter/s3.js
index bcd3ea60..626fe148 100644
--- a/lib/web/imageRouter/s3.js
+++ b/lib/web/imageRouter/s3.js
@@ -4,6 +4,7 @@ const path = require('path')
const config = require('../../config')
const {getImageMimeType} = require('../../utils')
+const logger = require('../../logger')
const AWS = require('aws-sdk')
const awsConfig = new AWS.Config(config.s3)
@@ -16,7 +17,7 @@ exports.uploadImage = function (imagePath, callback) {
}
if (!callback || typeof callback !== 'function') {
- callback(new Error('Callback has to be a function'), null)
+ logger.error('Callback has to be a function')
return
}