Ruby on Rails Drag and Drop Uploads with Active Storage, Stimulus.js and Dropzone.js - YouTube

This tutorial is about using Active Storage from Ruby on Rails 6.0 to create a drag and drop upload experience from scratch using Stimulus.js and Dropzone.js.Objective:The goal of this experience is to introduce drag and drop functionality and tie it to Rails Active Storage behind the scenes. I want to be able to drag and drop multiple files for upload as well as pass options that regulate what conditions can be passed around those files. Those conditions could be anything from image type to file size and more.How we solve the problem:With Webpack support now in Rails, I plan to leverage a couple of JavaScript libraries to help handle a lot of the drag and drop functionality. On top of this, I use some of the built-in JavaScript from @rails/activestorage to create a direct upload pattern. Ultimately, we will still use serverside rendered UI which is normal for a traditional Ruby on Rails application but enhance it with JavaScript to feel more dynamic.
Ruby on Rails Drag and Drop Uploads with Active Storage, Stimulus.js and Dropzone.js - YouTube #ruby #rubydeveloper #rubyonrails #active #stimulus.js #youtube https://rubyonrails.ba/single/ruby-on-rails-drag-and-drop-uploads-with-active-storage-stimulus-js-and-dropzone-js-youtube

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles