I am using Carrierwave + carrierwave_backgrounder + Sidekiq + Heroku to upload images. The upload works fine. When the upload form is submitted, I need to display the uploaded image, but background job is still processing it, so the page only displays the file name, I have to wait the background job is done, refresh the page to see it. How can I display a temp uploaded image when the page finish loading?
I know I can config the cache_dir to store a tmp image and will be deleted afterwards, like this:
def cache_dir
"#{Rails.root}/tmp/uploads"
end
Can I render this tmp image? If so, how do I render this in the view? I want to avoid using default_url in the uploader
I am using process_in_background :avatar in the model
Thanks!!
default_url
also make sure you setmove_to_cache
move_to_store
could improve ur background processing experience because seem like u r file are quite large – Viren