Skip to content

CoMakery/active_storage-postgresql

 
 

Repository files navigation

ActiveStorage::PostgreSQL

Gem Version Build Status

ActiveStorage Service to store files PostgeSQL.

Files are stored in PostgreSQL as Large Objects, which provide streaming style access. More information about Large Objects can be found here.

This allows use of ActiveStorage on hosting platforms with ephemeral file systems such as Heroku without relying on third party storage services.

There are some limits to the storage of Large Objects in PostgerSQL, so this is only recommended for prototyping and very small sites.

Installation

Add this line to your application's Gemfile:

gem 'active_storage-postgresql'

And then execute:

$ bundle

In config/storage.yml set PostgreSQL as the service

local:
  service: PostgreSQL

Copy over the migrations:

rails active_storage:install
rails active_storage:postgresql:install

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lsylvester/active_storage-postgresql. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Acknowledgments

Special thanks to diogob whos work on carrierwave-postgresql inspired this.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the ActiveStorage::PostgreSQL project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

PostgreSQL Adapter for Active Storage

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 85.9%
  • HTML 10.5%
  • JavaScript 2.2%
  • CSS 1.4%