Ask A Question

Notifications

You’re not receiving notifications from this thread.

I am looking to find a way to work through a modern image upload work flow with active storage

Corey Gibson asked in General

Things I am attempting to achive,

  1. Attach File with a js libary such as Dropzone.js
  2. Vaildate file size and type
  3. Crop image using libray such as Cropper.js to achive correct image aspect raito
  4. Submit file using rails Active Storage

I don't belive there is a guide for this any where and I know for a fact there are a lot of people that are really confused on this topic. Active Storage seems to be very limited with what it will do directly(ie... the fact that there is no validation built into active storage).

Any help in this subject would be great.

Reply

Hi Corey,

I know it's been months, but here's some info in video and code:

https://www.youtube.com/watch?v=fg_8qJ-su6A
https://github.com/justalever/drag_and_drop_active_storage

If you have the S3 part of the puzzle, please let me know.

Carl

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.