MCPcopy Index your code
hub / github.com/simstudioai/sim / getPresignedUrlWithConfig

Function getPresignedUrlWithConfig

apps/sim/lib/uploads/providers/s3/client.ts:157–168  ·  view source on GitHub ↗
(
  key: string,
  customConfig: S3Config,
  expiresIn = 3600
)

Source from the content-addressed store, hash-verified

155 * @returns Presigned URL
156 */
157export async function getPresignedUrlWithConfig(
158 key: string,
159 customConfig: S3Config,
160 expiresIn = 3600
161) {
162 const command = new GetObjectCommand({
163 Bucket: customConfig.bucket,
164 Key: key,
165 })
166
167 return getSignedUrl(getS3Client(), command, { expiresIn })
168}
169
170/**
171 * Download a file from S3

Callers 1

Calls 1

getS3ClientFunction · 0.85

Tested by

no test coverage detected