feat(minio): add get presigned function

This commit is contained in:
Methapon Metanipat 2024-10-22 09:36:04 +07:00
parent d2d9181493
commit 583dd11df2

View file

@ -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) {
return await minio.presignedGetObject(MINIO_BUCKET, path, exp);
}