Skip to main content

Action text rails 6

Rails • Asked by Pratima Singh

Hi Chris,

i cannot upload the images from rich text drag and drop to s3 from dev.

my development .rb
config.active_storage.service = :amazon

my storage.yml

local:
  service: Disk
  root: <%= Rails.root.join("storage") %>

test:
  service: Disk
  root: <%= Rails.root.join("tmp/storage") %>

amazon:
  service: S3
  access_key_id: <%= Rails.application.credentials.dig(:development, :aws, :access_key_id) %>
  secret_access_key: <%= Rails.application.credentials.dig(:development, :aws, :secret_access_key) %>
  region: <%= Rails.application.credentials.dig(:development, :aws, :region) %>
  bucket: <%= Rails.application.credentials.dig(:development, :aws, :bucket) %>

model

class Question < ApplicationRecord
  has_rich_text :body

also i have the right credentials for s3.

not sure what am i missing


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.