Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more functions #10

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Expose more functions #10

wants to merge 3 commits into from

Conversation

vanpana
Copy link
Contributor

@vanpana vanpana commented Dec 18, 2024

Expose getting a signed URL for a put action.

Also, since maybe not everything should be included in the library, it would be nice to be able to extend functionality per project use-case by being able to use the S3Client for custom tasks -- thus I exposed it with unsafe.

* @param objectKey
* @param expiresIn Expiration time in seconds.
*/
public async putObjectSignedUrl(objectKey: string, expiresIn: number): Promise<string> {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just the same as the GET one? Or is it used when you want to put an object and then retrieve the signed URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the docs it seems like the GET and POST ones are different URLs. So it's used to generate a signed URL where you can PUT an object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants