Skip to content

Commit

Permalink
Address review comments by Ersan.
Browse files Browse the repository at this point in the history
  • Loading branch information
prakashsvmx committed May 3, 2021
1 parent 9888225 commit 5b35149
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1086,8 +1086,9 @@ Apply object retention on an object
const bucketName = 'my-bucket'
const objectName ="my-object"

const retainUntilDate = new Date('2021-08-02')
retainUntilDate.setUTCHours(0,0,0,0)//Should be start of the day.(midnight)
const expirationDate = new Date()
expirationDate.setDate(expirationDate.getDate() + 1)
expirationDate.setUTCHours(0,0,0,0)//Should be start of the day.(midnight)
const versionId ="e67b4b08-144d-4fc4-ba15-43c3f7f9ba74"

const objRetPromise = minioClient.putObjectRetention(
Expand Down
3 changes: 2 additions & 1 deletion examples/put-object-retention.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ var s3Client = new Minio.Client({
const bucketName = 'my-bucket'
const objectName ="my-object"

const expirationDate = new Date('2021-08-02')
const expirationDate = new Date()
expirationDate.setDate(expirationDate.getDate() + 1)
expirationDate.setUTCHours(0,0,0,0)//Should be start of the day.(midnight)
const versionId ="my-versionId"

Expand Down

0 comments on commit 5b35149

Please sign in to comment.