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

Disable remove_previously_stored_files_after_update #8444

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

lauraghiorghisor-tw
Copy link
Contributor

@lauraghiorghisor-tw lauraghiorghisor-tw commented Nov 2, 2023

This config disables the default carrierwave behaviour of deleting previous images on update.

The issue with removing previous images is that the documents using them may have associations that also use the images. Therefore, when the images get deleted from asset-manager, the associated published documents will 404 for the image, unless an intentional update is run to inform the association that a new image has been provided.

Such an example is Speech document and the related Person who made the speech. Speech page shows the image of the person. When Person updates the picture, Speech needs to be republished as well, otherwise it will try to show the old image (404 if deletion enabled).

This config disables the default carrierwave behaviour of deleting previous images on update.
The issue with removing previous images is that the documents using them may have associations that also use the images.
Therefore, when the images get deleted from asset-manager, the associated published documents will 404 for the image, unless
an intentional update is run to inform the association that a new image has been provided.
Such an example is Speech document and the relates Person who made the speech. Speech page shows the image of the person.
When Person updates the picture, Speech needs to be republished as well, otherwise it will try to show the old image (404 if deletion enabled).
@lauraghiorghisor-tw lauraghiorghisor-tw force-pushed the do-not-remove-previously-stored-images branch from a5fb04a to dc4a683 Compare November 2, 2023 12:02
@lauraghiorghisor-tw lauraghiorghisor-tw merged commit f2d4dcd into main Nov 2, 2023
15 checks passed
@lauraghiorghisor-tw lauraghiorghisor-tw deleted the do-not-remove-previously-stored-images branch November 2, 2023 13:23
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

Successfully merging this pull request may close these issues.

2 participants