my front end needs to modify attachments, so it includes the following situations:
1. Delete all uploaded attachments
2. Delete some uploaded attachments
3. Upload a new attachment
4. Delete some attachments and upload new attachments
so how does the background judge this logic and implement it?