minio / minio-js

MinIO Client SDK for Javascript
https://docs.min.io/docs/javascript-client-quickstart-guide.html
Apache License 2.0
920 stars 271 forks source link

Expiry param is hardcoded 7 days, but some S3 providers accept more than 7 days #1281

Closed capfsb closed 3 months ago

capfsb commented 3 months ago

I want make presignedUrl with 30 days of expiry

here is docs of my S3 https://yandex.cloud/en/docs/storage/concepts/pre-signed-urls , look at max value of X-Amz-Expires available up to 30 days expiry

But i get thrown ExpiresParamError('expires param cannot be greater than 7 days'), i looked at code and seen than its hardcoded value

//part of presignSignatureV4 method

  if (expires > 604800) {
    throw new errors.ExpiresParamError('expires param cannot be greater than 7 days')
  }

Could make expiry param configurable? I want use all 30 days instead of 7 days by default? Or maybe i can make some work around?

p.s. i would't fork project

harshavardhana commented 3 months ago

You can fork and make those changes. We don't really have a requirement to extend it beyond AWS S3 defaults.