Skip to content
Permalink
Browse files

Change fractional seconds format to seconds

  • Loading branch information...
Jorge Marcial Álvarez Gago
Jorge Marcial Álvarez Gago committed Aug 30, 2017
1 parent c66df85 commit 91faaf42413722b0ea50c9c322c5e45ae50ff64c
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/index.js
  2. +2 −2 src/lib/index.coffee

Some generated files are not rendered by default. Learn more.

@@ -51,11 +51,11 @@ class S3Client

policyDoc = {}

policyDoc["expiration"] = moment.utc(expires).format("YYYY-MM-DD[T]HH:mm:SS[Z]") if expires and _.isDate expires
policyDoc["expiration"] = moment.utc(expires).format("YYYY-MM-DD[T]HH:mm:ss[Z]") if expires and _.isDate expires
policyDoc["conditions"] = []

dateShortPolicy = moment.utc().format('YYYYMMDD')
dateLongPolicy = moment.utc().format('YYYYMMDD[T]HHmmSS[Z]')
dateLongPolicy = moment.utc().format('YYYYMMDD[T]HHmmss[Z]')

policyDoc.conditions.push { 'bucket': bucket }
policyDoc.conditions.push [ 'starts-with', '$key', key ]

0 comments on commit 91faaf4

Please sign in to comment.
You can’t perform that action at this time.