SMF
SMF copied to clipboard
Attachments are not deleted after uploading a new one.
Description
If you edit a post with attachments to add more, and delete some, those 'deleted' ones aren't actually removed/deleted.
Steps to reproduce
- Post a message or topic with some attachments
- Edit the message and upload a new attachment
- Delete a previously uploaded attachment
- Save > The deleted attachment/s remain
Additional information/references
This bug only occurs on said order, it works fine if you first delete and then upload. As a matter of fact, this bug is reproducible on the same post if you have this scenario:
Uploaded attachments
- Attachment A
- Attachment B
- Attachment C
If I upload attachment D and then delete A, and then upload attachment E and delete B and then hit SAVE: The following attachments will be in the post:
- A
- B
- C
- D
- E
Additionally: You can't delete attachments if you click 'delete' and cancel the first time. Subsequent attempts will not trigger the button anymore.