webapp
webapp copied to clipboard
Add image deletion
Finish the implementation of the code in the ImageDeleteController
.
I think first we must add image import to DbContentImportHelper.
I think first we must add image import to DbContentImportHelper.
@tomaszsmy Another option would be to go http://localhost:8080/webapp/content/multimedia/image/list and press the + button (to manually upload an image file).
I have question about Store contribution event, we can't delete image without delete all contribution event. Should I delete all ImageContributionEvent and then delete image?
I have question about Store contribution event, we can't delete image without delete all contribution event. Should I delete all ImageContributionEvent and then delete image?
@tomaszsmy Good observation 🙂 Yes, that's correct; Before deleting an image, we need to first make sure to delete its corresponding contribution events. This way we prevent entities being left orphaned in the database.
https://github.com/elimu-ai/webapp/pull/1603
@tomaszsmy For testing image deletion, I recommend you first upload some of these .epub
files: https://github.com/elimu-ai/webapp/tree/main/src/test/resources/ai/elimu/util/epub
That will save you some time when developing on localhost
.
#1603
Instead of linking to the PR in the issue, I recommend you type "closes #1361" in the PR description. That way, the issue will be closed automatically once the PR gets merged.
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword