8000 When providing a generateSignedURL the expiresIn param is not available · Issue #12 · flydrive-js/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
When providing a generateSignedURL the expiresIn param is not available #12
Closed
@JanStevens

Description

@JanStevens

Hi,

In an attempt to adapt the generateSignedURL I noticed in the code that the expiresIn configuration is never passed to the custom function provided by the end user.

core/drivers/s3/driver.ts

Lines 458 to 468 in 011621a

const generateSignedURL = this.options.urlBuilder?.generateSignedURL
if (generateSignedURL) {
debug('using custom implementation for generating signed URL %s:%s', this.options.bucket, key)
return generateSignedURL(key, signedURLOptions, this.#client)
}
debug('generating signed URL %s:%s', this.options.bucket, key)
return getSignedUrl(this.#client, this.createGetObjectCommand(this.#client, signedURLOptions), {
expiresIn: expires,
})
}

Also instead of passing in GetObjectCommandInput as second argument, rather pass in the complete raw options as received in getSignedUrl. This way it's a lot easier to perform your own url signing without being tied to S3 specifics.

Regards

Metadata

Metadata

Assignees

Labels

Type: BugThe issue has indentified a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0