GithubHelp home page GithubHelp logo

file_browser's Introduction

DESCRIPTION

A rails plugin that provides a basic file browser. The primary use case for this plugin is:

  • To manage a directory of files includes subdirectories

  • To integration with products like CKEditor for selecting files.

Guiding Principals:

  • No database required

  • Pluggable backends (filesystem, S3, etc.) - Filesystem only currently

  • Pluggable integration with 3rd party products such as CKEditor

Possible Future Features:

  • Launcher can specify only certain file types to show (images only, only certain extensions, etc.)

  • Allow basic image manipulation (resize, crop, etc.)

  • File upload progress monitoring (for large files)

  • Icon previews (mainly for images show thumbnail for icon)

SETUP

In your Gemfile add:

gem 'file_browser'

In an initializer add:

FileBrowser.storages[:local] =
  FilesystemStorage.new Rails.root.join('public/uploaded_files')

Change the above path to be wherever you want to write files. Also make sure that directory is writable by the application.

Copy the assets to your public directory. This will likely later be automated as Rails adds support.

Finally point your browser to /local/uploaded_files/index and start managing your files via the web.

See example_integrations directory for how to integrate with 3rd party tools such as CKEditor.

CONFIGURATION

By default the app will use the “file_browser” layout. Obviously your can override that in your application if you want. If you want it to use the same layout as your main layout simply symlink file_browser.html.erb to your application.html.erb file. If you use your own layout make sure that it includes the prototype library and that it yields to the symbol :file_browser_footer.

You can have multiple storage repositories that can be registered and accessed. See FileBrowser#storages for more info.

CREDIT

This gem was developed by Eric Anderson (pixelwareinc.com) while developing projects under Red Tusk Studios (redtusk.com).

file_browser's People

Contributors

eric1234 avatar

Watchers

Meredith avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.