Adding prefix /shrine for static images

Otherwise /screenshot/:name might get confused with
/screenshot/simage/123/small-123.png
This commit is contained in:
Christoph Haas 2021-02-13 22:16:37 +01:00
parent afba572dcd
commit 6d0ed8c8f8

View file

@ -7,7 +7,7 @@ require "shrine/storage/file_system"
Shrine.storages = {
# Saves to ./public/screenshot/ID/image/…
cache: Shrine::Storage::FileSystem.new("public", prefix: "cache"),
store: Shrine::Storage::FileSystem.new("public", prefix: "/"),
store: Shrine::Storage::FileSystem.new("public", prefix: "shrine"),
}
# See plugin documentation at https://shrinerb.com/docs/plugins/activerecord