-
Notifications
You must be signed in to change notification settings - Fork 246
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
[Upgraded] For paperclip 3.1.2, with S3 fixes, and generic paperclip versions #69
base: master
Are you sure you want to change the base?
Conversation
…or, tested across rails versions and added Rails 3.2 to test suite. Paperclip version bumped to 2.7. - Main issue - `attachment`_updated_at was not being updated, new Paperclip (> 2.4.5) assigns the updated_at of the `attachment`, when S3 took too long, or the queue takes longer than a second to pick the image up, the `attachment`_updated_at and instance.updated_at get out of sync, and the url generated (with :updated_at in the hash_data - default), will not find the newly created images.
So in gemfile :
|
Good point @timols, i'll update now. |
…ip does this in reprocess, test updated to ensure outcome
Removed unnecessary line and made sure a test checks the resulting value in case paperclip changes their API. |
The redefinition of the most_appropriate_url doesn't work for me, it's still the original Paperclip::UrlGenerator one that is called. Also why not just creating a new UrlGenerator inheriting from Paperclip::UrlGenerator? You could just modify the default options to use it then. Here's what I did in my app:
And then in my model
|
Oh, I also had another problem with your patch, you can't call |
@bastien good idea, just want to work out a cleaner way to make it apply across the board when using delayed_paperclip, didn't have time to sort it out, so the quick hack won in the end unfortunately. Calling reprocess! is working fine in prod for us? |
@tommeier is it because you set the attachment post_processing to |
Changelog: - Merge in upstream #69. - Various odds and ends in the readme.
Updated with my previous fixes to ensure it works on S3 too.
This is now working with paperclip 3.1.2, updated tests accordingly and gemfiles.