Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Expanded URI Obfuscation documentation.

  • Loading branch information...
commit 2b8526b42b28d1a29a1a547ab999de747353fdef 1 parent d808aa6
trafnar authored sikachu committed
Showing with 15 additions and 3 deletions.
  1. +15 −3 README.md
View
18 README.md
@@ -234,10 +234,22 @@ URI Obfuscation
---------------
Paperclip has an interpolation called `:hash` for obfuscating filenames of
-publicly-available files. For more on this feature read the author's own
-explanation.
+publicly-available files.
-[https://github.com/thoughtbot/paperclip/pull/416](https://github.com/thoughtbot/paperclip/pull/416)
+Example Usage:
+
+ has_attached_file :avatar, {
+ :url => "/system/:hash.:extension",
+ :hash_secret => "longSecretString"
+ }
+
+
+The `:hash` interpolation will be replaced with a unique hash made up of whatever
+is specified in `:hash_data`. The default value for `:hash_data` is `":class/:attachment/:id/:style/:updated_at"`.
+
+`:hash_secret` is required, an exception will be raised if `:hash` is used without `:hash_secret` present.
+
+For more on this feature read the author's own explanation. [https://github.com/thoughtbot/paperclip/pull/416](https://github.com/thoughtbot/paperclip/pull/416)
MD5 Checksum / Fingerprint
-------
Please sign in to comment.
Something went wrong with that request. Please try again.