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.
I can't get variant(size: "") to work while using a cloud provider in production.
I need to user.avatar.service_url.split("?").first to get the right path for the img but when I do this, I can't use variant because that path is a string.
Any idea how I overcome this.
Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.