Feature Request: Add Image caching for when ecto changesets are invalid
Closed this issue · 1 comments
Given I'm filling out a form for a model
When I'v selected an image
And I have some other attributes that will cause the changeset to be invalid
When I submit the form and it re-renders the edit view
Then I would like it if I didn't have to reselect the image and the previous selection was still set.
An example of how a simular ruby project carrierwave does this can be found here.
https://github.com/carrierwaveuploader/carrierwave#making-uploads-work-across-form-redisplays
Ruby's Refile does a fantastic job of this. It uses two buckets in AWS: cache
and store
. Initially, the file is saved to the cache
bucket on form submission. If the form submission succeeds, the file is copied from the cache
to the store
bucket; otherwise, the cache will auto-expire and delete the file.