|
@@ -1,5 +1,4 @@
|
|
|
const router = require('express').Router
|
|
|
-const ms = require('ms')
|
|
|
|
|
|
module.exports = function s3 (config) {
|
|
|
if (typeof config.acl !== 'string') {
|
|
@@ -46,7 +45,7 @@ module.exports = function s3 (config) {
|
|
|
|
|
|
client.createPresignedPost({
|
|
|
Bucket: config.bucket,
|
|
|
- Expires: ms('5 minutes') / 1000,
|
|
|
+ Expires: config.expires,
|
|
|
Fields: fields,
|
|
|
Conditions: config.conditions
|
|
|
}, (err, data) => {
|
|
@@ -94,7 +93,7 @@ module.exports = function s3 (config) {
|
|
|
ACL: config.acl,
|
|
|
ContentType: type,
|
|
|
Metadata: metadata,
|
|
|
- Expires: ms('5 minutes') / 1000
|
|
|
+ Expires: config.expires
|
|
|
}, (err, data) => {
|
|
|
if (err) {
|
|
|
next(err)
|
|
@@ -191,7 +190,7 @@ module.exports = function s3 (config) {
|
|
|
UploadId: uploadId,
|
|
|
PartNumber: partNumber,
|
|
|
Body: '',
|
|
|
- Expires: ms('5 minutes') / 1000
|
|
|
+ Expires: config.expires
|
|
|
}, (err, url) => {
|
|
|
if (err) {
|
|
|
next(err)
|