Skip to content
Rails ActiveStorage DirectUploads engine for Uppy
JavaScript
Branch: master
Clone or download
Pull request Compare This branch is 7 commits ahead of Rudiney:master.
Latest commit 025bf91 Jan 16, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Update index.js Jan 16, 2020
types Initial commit. Sep 28, 2018
.gitignore Update for github packages Jan 16, 2020
LICENSE Initial commit Sep 28, 2018
README.md Update README.md Jan 16, 2020
package.json Update package.json Jan 16, 2020

README.md

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 with Webpacker.

const Uppy = require('@uppy/core')
const ActiveStorageUpload = require('uppy-activestorage-upload')

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

Installation

yarn add https://github.com/excid3/uppy-activestorage-upload
or
npm install https://github.com/excid3/uppy-activestorage-upload --save

We recommend installing from npm and then using a module bundler such as Webpack, Browserify or Rollup.js.

License

The MIT License.

You can’t perform that action at this time.