[#1187] move file upload and delete out of the record save transaction

This commit is contained in:
Gani Georgiev committed 2022-12-06 12:26:29 +02:00
1 parent 808f5054d0
commit 355f7053fd
3 files changed
+77 -47

No files matched your search

+3 -5
View File
@@ -176,13 +176,11 @@ func (s *System) DeletePrefix(prefix string) []error {
dirsMap := map[string]struct{}{}
dirsMap[prefix] = struct{}{}
opts := blob.ListOptions{
Prefix: prefix,
}
// delete all files with the prefix
// ---
iter := s.bucket.List(&opts)
iter := s.bucket.List(&blob.ListOptions{
Prefix: prefix,
})
for {
obj, err := iter.Next(s.ctx)
if err == io.EOF {