mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
feat(api): redirect artifact downloads to presigned storage URLs (#1703)
This commit is contained in:
1 parent
c35d29ea0b
commit
41c7acdd8f
11 files changed
+149
-2
No files matched your search
@@ -241,14 +241,20 @@ export class StorageService implements IStorageService {
|
||||
bucket,
|
||||
key,
|
||||
expiresIn = seconds('5 minutes'),
|
||||
responseContentType,
|
||||
responseContentDisposition,
|
||||
}: {
|
||||
bucket: string;
|
||||
key: string;
|
||||
expiresIn?: number;
|
||||
responseContentType?: string;
|
||||
responseContentDisposition?: string;
|
||||
}): Promise<string> {
|
||||
const command = new GetObjectCommand({
|
||||
Bucket: bucket,
|
||||
Key: key,
|
||||
ResponseContentType: responseContentType,
|
||||
ResponseContentDisposition: responseContentDisposition,
|
||||
});
|
||||
return getSignedUrl(this.presignClient, command, {expiresIn});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user