Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save_attachment method removes previously associated attachments #54

Open
thaddeusm opened this issue May 16, 2023 · 0 comments
Open

save_attachment method removes previously associated attachments #54

thaddeusm opened this issue May 16, 2023 · 0 comments

Comments

@thaddeusm
Copy link

I'm working on a feature to allow users to edit their comments (and attachments) from the frontend. I'm using save_attachment() to handle additional attachments when a user edits and updates their comments. However, this method seems to replace any attachments that were previously associated with the comment.

I have patched this method in my local environment so that it accepts an array of previously associated attachment ids. Then, I'm merging those with any newly uploaded attachments before the method calls assign_attachment().

If I'm overlooking a method that I could use instead, I would appreciate any advice. Otherwise, would it be possible to add this type of support to the plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant