diff options
Diffstat (limited to 'app/node_modules/okservices/oks3/index.js')
| -rw-r--r-- | app/node_modules/okservices/oks3/index.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/node_modules/okservices/oks3/index.js b/app/node_modules/okservices/oks3/index.js index 41ee3dc..60567e9 100644 --- a/app/node_modules/okservices/oks3/index.js +++ b/app/node_modules/okservices/oks3/index.js @@ -46,6 +46,7 @@ function OKS3(options) { key: options.s3.key, secret: options.s3.secret, bucket: options.s3.bucket, + local: options.s3.local, }) var express = options.express; @@ -85,7 +86,7 @@ function OKS3(options) { router.post('/audio', mult.single('audio'), function(req, res) { d.run(function () { - if (! options.s3.image.allowed) { + if (! options.s3.audio.allowed) { return res.status(500).json({ error: "Audio uploading not permitted" }) } @@ -113,7 +114,7 @@ function OKS3(options) { router.post('/video', mult.single('video'), function(req, res) { d.run(function () { - if (! options.s3.image.allowed) { + if (! options.s3.video.allowed) { return res.status(500).json({ error: "Video uploading not permitted" }) } @@ -140,7 +141,7 @@ function OKS3(options) { router.post('/file', mult.single('file'), function(req, res) { d.run(function () { - if (! options.s3.image.allowed) { + if (! options.s3.file.allowed) { return res.status(500).json({ error: "File uploading not permitted" }) } @@ -149,6 +150,10 @@ function OKS3(options) { preserveFilename: options.s3.video.preserveFilename, dirname: options.s3.dirname, types: { + 'image/gif': 'gif', + 'image/jpeg': 'jpg', + 'image/jpg': 'jpg', + 'image/png': 'png', 'application/pdf': 'pdf', 'text/plain': 'txt', 'text/html': 'html', |
