mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 14:35:40 +00:00
Delete deleted release attachments immediately from storage (#23913)
Previously, deleted release attachments were kept forever on the external storage. Note: It may be very slow now if there are many attachments to be deleted on this release. Fix #23728
This commit is contained in:
parent
6e346f84c1
commit
e5dcd6aada
|
@ -227,7 +227,7 @@ func UpdateRelease(doer *user_model.User, gitRepo *git.Repository, rel *repo_mod
|
||||||
deletedUUIDs.Add(attach.UUID)
|
deletedUUIDs.Add(attach.UUID)
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := repo_model.DeleteAttachments(ctx, attachments, false); err != nil {
|
if _, err := repo_model.DeleteAttachments(ctx, attachments, true); err != nil {
|
||||||
return fmt.Errorf("DeleteAttachments [uuids: %v]: %w", delAttachmentUUIDs, err)
|
return fmt.Errorf("DeleteAttachments [uuids: %v]: %w", delAttachmentUUIDs, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue