Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

wollzelle/typus_upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typus Upload

Upload module for Typus, adds support for uploading files to Amazon S3.

Note: Only uploading is currently supported (no delete).

Installation

In your Gemfile:

gem 'typus_upload'
gem 'react-rails', '~> 1.0.0.pre', github: 'reactjs/react-rails'

Note: until react-rails 1.0 is released you need to manually include this gem as a dependency. This will be fixed in the future.

Configuration

Add your S3 config to your ENV variables:

AWS_BUCKET=<bucket>
AWS_ACCESS_KEY_ID=<id>
AWS_SECRET_ACCESS_KEY=<key>
AWS_PROXY=<proxy>

In your model:

class Post < ActiveRecord::Base
  typus_upload :attachment_url
end

In your Admin controller:

class Admin::PostsController < Admin::ResourcesController
  include Admin::Uploads
end

# Files will be uploaded to /posts by default, override this with:
def upload_prefix
  'downloads/'
end

About

Upload module for Typus CMS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors