diff --git a/main.js b/main.js index 1ca9fa3..f47f0d0 100644 --- a/main.js +++ b/main.js @@ -42,7 +42,7 @@ function s3instance(accessKey, secretKey) { var dateObj = new Date; var dateExp = new Date(dateObj.getTime() + duration * 1000); var policy = { - "expiration":dateExp.getUTCFullYear() + "-" + dateExp.getUTCMonth() + 1 + "-" + dateExp.getUTCDate() + "T" + dateExp.getUTCHours() + ":" + dateExp.getUTCMinutes() + ":" + dateExp.getUTCSeconds() + "Z", + "expiration":dateExp.getUTCFullYear() + "-" + (dateExp.getUTCMonth() + 1) + "-" + dateExp.getUTCDate() + "T" + dateExp.getUTCHours() + ":" + dateExp.getUTCMinutes() + ":" + dateExp.getUTCSeconds() + "Z", "conditions":[ { "bucket":bucket }, ["eq", "$key", key], @@ -70,4 +70,4 @@ function s3instance(accessKey, secretKey) { } -module.exports = s3instance; \ No newline at end of file +module.exports = s3instance;