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
Removing single image when using multiple file uploads feature, doesn't work when only one image left #2024
Comments
I have another issue with this code (commented here #1704 (comment)) |
@bobbybobby Hi bobby I am aware of the issue but haven't dived into solving it. As I don't really have a clue why this happens yet. 😕 |
@bobbybobby @bobintornado I have this issue too and others have confirmed it. There is a workaround for it. See #1990 |
@anduong thanks I see! 😃 |
I find out there is another way to do it with just params rails provided.
In ImagesController.rb
|
Merging into #1990. |
According to the wiki https://github.com/carrierwaveuploader/carrierwave/wiki/How-to:-Add-more-files-and-remove-single-file-when-using-default-multiple-file-uploads-feature it's possible to remove only one image of a column where
mount_uploaders
is used with the following manipulation :However I found that in case there is only one image left in the array it doesn't work. I can workaround that by checking the length of the array and calling
@gallery.remove_images!
in that case, but that would be great for code consistency if it always worked.The text was updated successfully, but these errors were encountered: