mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
13 lines
536 B
Ruby
13 lines
536 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'shrine'
|
|
require 'shrine/storage/file_system'
|
|
|
|
Shrine.storages = {
|
|
cache: Shrine::Storage::FileSystem.new('public', prefix: 'uploads/cache'), # temporary
|
|
store: Shrine::Storage::FileSystem.new('public', prefix: 'uploads') # permanent
|
|
}
|
|
|
|
Shrine.plugin :activerecord # loads Active Record integration
|
|
Shrine.plugin :cached_attachment_data # enables retaining cached file across form redisplays
|
|
Shrine.plugin :restore_cached_data # extracts metadata for assigned cached files
|