Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Expanded URI Obfuscation documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
trafnar authored and sikachu committed Oct 14, 2011
1 parent d808aa6 commit 2b8526b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down

0 comments on commit 2b8526b

Please sign in to comment.