Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paperclip with sidekiq

I am using paperclip for uploading files. Does anybody have use it with sidekiq for background jobs?

I was trying to achieve something similar to railscast 383 (uploading to Amazon S3) but with paperclip and sidekiq.

I didn't find too much information for using it with sidekiq and I am thinking if I should change to carrierwave or if there is any example for paperclip and sidekiq (not with FancyUploader and delayed_jobs).

like image 324
JohnDel Avatar asked Jun 22 '13 20:06

JohnDel


1 Answers

I think what you're looking for is the delayed_paperclip gem: https://github.com/jrgifford/delayed_paperclip/

According to the gem it has a nice ActiveRecord api so you can do something like:

 class User < ActiveRecord::Base
   has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }

   process_in_background :avatar
 end
like image 171
codenamev Avatar answered Oct 16 '22 13:10

codenamev