Does anyone know if there's a way to send the preview request to a background job on upload? so something like sidekiq will handle generating and saving the preview when the file is uploaded and not waiting until a user requests the preview and making them wait?
I am having no difficulties with my local setup and getting this to work. However, I am getting errors on my Heroku app on production. I watched the tutorial on Encrypted Credentials which was fantastic but unfortunately it didn't solve my issue. My storage.yml file looks like the following:
digitalocean: service: S3 access_key_id: <%= Rails.application.credentials.dig(:digitalocean, :access_key_id) %> secret_access_key: <%= Rails.application.credentials.dig(:digitalocean, :secret_access_key) %> bucket: ted-blog region: nyc3 endpoint: <%= Rails.application.credentials.dig(:digitalocean, :endpoint_address) %> ``` If anyone has an insight into what might be the problem, I'd be grateful. Thanks!
I created a secondary model
Attachments to add has_attached to so I could add additional fields. The issue is that there no easy way to validate the presence of an attachment. Also when my validation on the other fields fails the previously uploaded file does not seem to persist to the render :edit page.
Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.