No commit activity in last 3 years
No release in over 3 years
This is a filemanager for ruby on rails that works right away with CKEditor
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

> 3.0.0
 Project Readme

RailsFilemanager¶ ↑

This is a filemanager for ruby on rails. It works right away with CKEditor.

See demo at: filemanager-demo.herokuapp.com

Getting Started¶ ↑

  1. Add this to your gemfile:

    gem "rails_filemanager"
    
  2. Run the generator:

    rails generate rails_filemanager:install
    rake db:migrate
    
  3. Now mount the filemanager in your routes:

    # config/routes.rb
    
    mount RailsFilemanager::Engine => "/filemanager"
    

You can now find the filemanager at /filemanager

Configuration¶ ↑

Authorization¶ ↑

Use the method check_authorization to ensure that a user is logged in:

# config/initializers/rails_filemanager.rb

def check_authorization
    raise "unauthorized" unless session[:admin]
end

Storage¶ ↑

The filemanager uses paperclip for storing the files. You can use your own storage options, if you want to use amazon s3 for instance:

# config/initializers/rails_filemanager.rb

RailsFilemanager::Engine.config.paperclip_storage_options = {
    storage: :s3,
    bucket: "static.example.com",
    s3_host_alias: "static.example.com",
    url: ":s3_alias_url",
    path: ":attachment/:id/:style/:basename.:extension",
    s3_credentials: {
        access_key_id: "ACCESSKEY",
        secret_access_key: "SECRET"
    }
}

Translation¶ ↑

The default translation is:

rails_filemanager:
  upload: "Upload files"
  delete: "Delete %{filename}?"

Say, if your app speaks spanish, you could use this example:

# config/locales/es.yml

rails_filemanager:
  upload: "Upload archivos"
  delete: "¿Eliminar %{filename}?"

Roadmap¶ ↑

  • Organize in folders

  • Custom javascript callback

  • Adding unit tests

License¶ ↑

This project rocks and uses MIT-LICENSE. <<<<<<< HEAD

Uploadify: www.uploadify.com/mit-license/

Paperclip: github.com/thoughtbot/paperclip#license

¶ ↑

>>>>>>> baf16fe1f2677143989f07591bd3b265dcd2b844