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

Question: How to delete specific version of an image #24

Closed
goravbhootra opened this issue Dec 7, 2019 · 1 comment
Closed

Question: How to delete specific version of an image #24

goravbhootra opened this issue Dec 7, 2019 · 1 comment
Assignees

Comments

@goravbhootra
Copy link

Hi,

This is a question rather than a bug. Given the versions:

@versions [:original, :passport, :thumb]

How to delete only the :original or :thumb version after storing the image?

I am storing the original image while user uploads but after specific business logic, only passport size is retained for archival purpose.

The delete function given in documentation deletes all versions of the image. Is passing the specific version enough?

Thanks,
Gorav

@achempion
Copy link
Member

Right now we have a private delete_version function what does what you want. But there are several ways to retain version if you want to:

  1. define it as :skipped Bypass delete on skipped versions #8 if the scope has an archive flag, delete action wouldn't delete skipped versions
  2. use delete directly from storage action, it accepts version, wouldn't recommend it through to not depend on implementation details

@achempion achempion self-assigned this Dec 9, 2019
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

2 participants