mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 08:25:07 +00:00
v4.6 -1 (#459)
This commit is contained in:
9
packages/service/core/dataset/file/controller.ts
Normal file
9
packages/service/core/dataset/file/controller.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { BucketNameEnum } from '@fastgpt/global/common/file/constants';
|
||||
import { getGFSCollection } from '../../../common/file/gridfs/controller';
|
||||
|
||||
export async function delDatasetFiles({ datasetId }: { datasetId: string }) {
|
||||
const db = getGFSCollection(BucketNameEnum.dataset);
|
||||
await db.deleteMany({
|
||||
'metadata.datasetId': String(datasetId)
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user