Skip to content

[Version: 3.4.0] DELETE TaskAttachments not deleting from S3 #325

@vlovini

Description

@vlovini

Describe the bug
When a DELETE is sent directly to a non-draft Attachment entity, the 'DeleteAttachment' event is not emitted and the attachment remains on the remote storage.

The code seems to be missing the scenario for .before('DELETE', 'TaskAttachments', ...) for non-drafts.

To Reproduce (locally)

  • Add a breakpoint on the 'DeleteAttachment' handler
  • Call DELETE on the attachment entity (non-draft):
DELETE /TaskAttachments(up__ID=...,ID=...)
  • Check if the 'DeleteAttachment' event was emitted

To Reproduce (BTP + S3)

  • Enable CAP & plugin debug mode
  • Call DELETE on the attachment entity (non-draft):
DELETE /TaskAttachments(up__ID=...,ID=...)
  • S3 delete logs are not found

Expected behavior
Delete logs should be present and the file should be deleted from the remote storage.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions