feat(minio): add get presigned function
This commit is contained in:
parent
d2d9181493
commit
583dd11df2
1 changed files with 4 additions and 0 deletions
|
|
@ -18,6 +18,10 @@ export async function listFile(path: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getPresigned(method: string, path: string, exp = 60 * 60) {
|
||||||
|
return await minio.presignedUrl(method, MINIO_BUCKET, path, exp);
|
||||||
|
}
|
||||||
|
|
||||||
export async function getFile(path: string, exp = 60 * 60) {
|
export async function getFile(path: string, exp = 60 * 60) {
|
||||||
return await minio.presignedGetObject(MINIO_BUCKET, path, exp);
|
return await minio.presignedGetObject(MINIO_BUCKET, path, exp);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue