Skip to content

Rails ActiveStorage DirectUploads engine for Uppy

License

Notifications You must be signed in to change notification settings

GoThassos/uppy-activestorage-upload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uppy-activestorage-upload

Uppy logo: a superman puppy in a pink suit

The ActiveStorage Upload plugin handles Ruby on Rails ActiveStorage direct uploads with Uppy.

Example

Add this line to your HEAD tag.

<%= tag.meta name: "direct-upload-url", content: rails_direct_uploads_path %>

Then use ActiveStorageUpload as an Uppy plugin in your Javascript pack.

import Uppy from '@uppy/core'
import ActiveStorageUpload from '@gothassos/uppy-activestorage-upload'

let uppy = new Uppy(options)
uppy.use(ActiveStorageUpload, {
  directUploadUrl: document.querySelector("meta[name='direct-upload-url']").getAttribute("content")
})

Installation

yarn add @gothassos/uppy-activestorage-upload
# or
npm install @gothassos/uppy-activestorage-upload --save

We recommend installing from yarn and then using a module bundler such as esbuild.

License

The MIT License.

About

Rails ActiveStorage DirectUploads engine for Uppy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%