From be5ab53424107c790c26920f55579fb71471d469 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Tue, 10 Feb 2015 22:23:29 +0100 Subject: [PATCH] Trying to obfuscate Paperclip URLs --- app/models/screenshot.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/screenshot.rb b/app/models/screenshot.rb index fdf0890..3f3af16 100644 --- a/app/models/screenshot.rb +++ b/app/models/screenshot.rb @@ -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.