blocknotes / active_storage_db

An ActiveStorage service plugin to store files in a PostgreSQL / MySQL / MSSQL database (for Rails 6/7)
MIT License
38 stars 5 forks source link
activestorage activestorage-service mysql postgres postgresql rails ruby

Active Storage DB

gem version gem downloads maintainability

linters specs Postgres specs MySQL

An Active Storage service upload/download plugin that stores files in a PostgreSQL or MySQL database. Experimental support also for MSSQL.

Main features:

Useful also with platforms like Heroku (due to their ephemeral file system).

Installation

db:
  service: DB

Misc

Some utility tasks are available:

# list attachments ordered by blob id desc (with limit 100):
bin/rails 'asdb:list'
# search attachments by filename (or part of it)
bin/rails 'asdb:search[some_filename]'
# download attachment by blob id (retrieved with list or search tasks) - the second argument is the destination:
bin/rails 'asdb:download[123,/tmp]'

Do you like it? Star it!

If you use this component just star it. A developer is more motivated to improve a project when there is some interest.

Or consider offering me a coffee, it's a small thing but it is greatly appreciated: about me.

Contributors

License

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