14 lines
357 B
Ruby
14 lines
357 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'shrine'
|
|
require 'shrine/storage/file_system'
|
|
|
|
Shrine.storages = {
|
|
cache: Shrine::Storage::FileSystem.new('public', prefix: 'uploads/cache'),
|
|
store: Shrine::Storage::FileSystem.new('public', prefix: 'uploads')
|
|
}
|
|
|
|
Shrine.plugin :activerecord
|
|
Shrine.plugin :cached_attachment_data
|
|
Shrine.plugin :restore_cached_data
|