Trying to obfuscate Paperclip URLs

This commit is contained in:
Christoph Haas 2015-02-10 22:23:29 +01:00
parent 65f74e0568
commit be5ab53424

View file

@ -7,8 +7,10 @@ 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
default_url: "/images/dummy/no-screenshots-upload-one.svg",
path: ":rails_root/public/system/:class/:attachment/:id_partition/:style/:filename",
url: "/system/:hash.:extension",
hash_secret: "M4xGM9v6y17Y27sZ1liWrnQaXdX4YDdZCJ7fOqcAUg3cZJqK9x"
validates_attachment_content_type :image, :content_type => /\Aimage\/png\Z/
# Return caption for full-screen screenshots.