Skip to content

Instantly share code, notes, and snippets.

View benpixel's full-sized avatar
🚀

Benjamin Alijagić benpixel

🚀
View GitHub Profile
@javan
javan / direct-uploads.md
Last active January 29, 2023 10:58
Active Storage direct uploads

direct-uploads

rails/activestorage#81

// direct_uploads.js

addEventListener("direct-upload:initialize", event => {
  const { target, detail } = event
  const { id, file } = detail