fix: After the file is deleted, it still remains in the bucket. (#7482)

### What problem does this PR solve?

Fix: After deleting the file from the file management menu, it was not
removed from the MinIO bucket.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [ ] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):

Co-authored-by: liuzhenghua-jk <liuzhenghua-jk@360shuke.com>
This commit is contained in:
liuzhenghua 2025-05-06 19:30:42 +08:00 committed by GitHub
parent bc3160f75a
commit b1c8746984
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -257,6 +257,7 @@ def rm():
STORAGE_IMPL.rm(file.parent_id, file.location) STORAGE_IMPL.rm(file.parent_id, file.location)
FileService.delete_folder_by_pf_id(current_user.id, file_id) FileService.delete_folder_by_pf_id(current_user.id, file_id)
else: else:
STORAGE_IMPL.rm(file.parent_id, file.location)
if not FileService.delete(file): if not FileService.delete(file):
return get_data_error_result( return get_data_error_result(
message="Database error (File removal)!") message="Database error (File removal)!")