feat: add minio list detect
This commit is contained in:
@@ -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[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user