Customized file path to screenshot files
This commit is contained in:
parent
8b7d6aed84
commit
ada5832dae
1 changed files with 3 additions and 2 deletions
|
|
@ -8,8 +8,9 @@ class Screenshot < ActiveRecord::Base
|
|||
has_attached_file :image,
|
||||
styles: { :large => "800x600>", :thumb => "160x120>" },
|
||||
default_url: "/images/dummy/no-screenshots-upload-one.svg",
|
||||
path: ":rails_root/public/system/:class/:attachment/:id_partition/:style/:filename",
|
||||
url: "/system/:hash.:extension",
|
||||
#path: ":rails_root/public/system/:class/:attachment/:id_partition/:style/:filename",
|
||||
path: ":rails_root/public/screenshots/:id_partition/:style.png",
|
||||
url: "/screenshots/:id_partition/:style.png",
|
||||
hash_secret: "M4xGM9v6y17Y27sZ1liWrnQaXdX4YDdZCJ7fOqcAUg3cZJqK9x"
|
||||
validates_attachment_content_type :image, :content_type => /\Aimage\/png\Z/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue