We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d20a81e commit ec2ae10Copy full SHA for ec2ae10
1 file changed
src/features/s3/presignUrl/index.ts
@@ -4,8 +4,11 @@ import { parseUrl } from "@aws-sdk/url-parser";
4
import { Hash } from "@aws-sdk/hash-node";
5
import { formatUrl } from "@aws-sdk/util-format-url";
6
7
-export const getPresignedUrl = async (url: string): Promise<string> => {
8
- const expirationSeconds = 1200; // 20 minutes
+// default expiration is 20 minutes (1200 seconds)
+export const getPresignedUrl = async (
9
+ url: string,
10
+ expirationSeconds: number = 1200
11
+): Promise<string> => {
12
const s3ObjectUrl = parseUrl(url);
13
const presigner = new S3RequestPresigner({
14
credentials: {
0 commit comments