fix: Uploaded and immediately deleted images are not removed from storage (#4562)
* fix: Uploaded and immediately deleted images are not removed from storage upon permanant delete closes #4557 * Move attachment deletion async
This commit is contained in:
@@ -333,6 +333,7 @@ class Team extends ParanoidModel {
|
||||
if (attachment) {
|
||||
await DeleteAttachmentTask.schedule({
|
||||
attachmentId: attachment.id,
|
||||
teamId: model.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -604,6 +604,7 @@ class User extends ParanoidModel {
|
||||
if (attachment) {
|
||||
await DeleteAttachmentTask.schedule({
|
||||
attachmentId: attachment.id,
|
||||
teamId: model.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user