Skip to content

Commit

Permalink
Merge pull request #164 from katalon-studio/TES-417-fix
Browse files Browse the repository at this point in the history
[TES-417] Add more 2 minutes to ensure regenerate presinged url
  • Loading branch information
quidl authored Jan 9, 2024
2 parents 8575adb + 7387d8f commit 11991f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/transports.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class S3FileTransport extends TransportStream {
const dateFormart = 'YYYYMMDDTHHmmss[Z]';
const dateExpires = moment.utc(amzDate, dateFormart).toDate();
dateExpires.setSeconds(dateExpires.getSeconds(), amzExpires * 1000);
// Minus more 2 minutes to ensure regenerate presigned url
dateExpires.setSeconds(dateExpires.getSeconds(), -(2 * 60 * 1000));

const now = new Date();
if (dateExpires < now) {
Expand Down

0 comments on commit 11991f2

Please sign in to comment.