Hooking up Dropzone.js with ActiveStorage DirectUpload via Stimulus.js

Julian Rubisch
Sep 1, 2018 · 1 min read

Recently I was trying to implement a drag‘n‘drop upload solution with Rails ActiveStorage (wired to Amazon S3 internally), but found the docs rather sparse. One other helpful snippet was this.

So when I managed to do it, I decided to write up this (my first) github gist. So here it is:

Careful, this is only the beginning! As we overwrite Dropzone‘s drop event handler, we have to take care of everything (e.g. error handling) ourselves.

Boiling Plates

Just another TIL insight blog…

Julian Rubisch

Written by

www.julianrubisch.at

Boiling Plates

Just another TIL insight blog…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade