feat: add minio list detect

This commit is contained in:
2025-03-13 02:32:28 +08:00
parent 1c820c3083
commit efef48a1b0
8 changed files with 208 additions and 15 deletions

View File

@@ -77,3 +77,16 @@ export const deleteFiles = async (prefixs: string[]): Promise<any> => {
return false;
}
};
type GetMinioListAndSetToAppListOpts = {
username: string;
appKey: string;
version: string;
};
// 批量列出文件并设置到appList的files中
export const getMinioListAndSetToAppList = async (opts: GetMinioListAndSetToAppListOpts) => {
const { username, appKey, version } = opts;
const minioList = await getMinioList({ prefix: `${username}/${appKey}/${version}`, recursive: true });
const files = minioList;
return files as MinioFile[];
};