Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

Latest commit

 

History

History
54 lines (35 loc) · 2.16 KB

README.md

File metadata and controls

54 lines (35 loc) · 2.16 KB

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.