Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
15c6c9e8
Commit
15c6c9e8
authored
Aug 16, 2010
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic changes to fingerprinting.
parent
2cdeb39a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
lib/paperclip/attachment.rb
+7
-8
No files found.
lib/paperclip/attachment.rb
View file @
15c6c9e8
...
@@ -15,7 +15,7 @@ module Paperclip
...
@@ -15,7 +15,7 @@ module Paperclip
:default_url
=>
"/:attachment/:style/missing.png"
,
:default_url
=>
"/:attachment/:style/missing.png"
,
:default_style
=>
:original
,
:default_style
=>
:original
,
:storage
=>
:filesystem
,
:storage
=>
:filesystem
,
:
include_updated_timestamp
=>
true
,
:
use_timestamp
=>
true
,
:whiny
=>
Paperclip
.
options
[
:whiny
]
||
Paperclip
.
options
[
:whiny_thumbnails
]
:whiny
=>
Paperclip
.
options
[
:whiny
]
||
Paperclip
.
options
[
:whiny_thumbnails
]
}
}
end
end
...
@@ -40,7 +40,7 @@ module Paperclip
...
@@ -40,7 +40,7 @@ module Paperclip
@default_url
=
options
[
:default_url
]
@default_url
=
options
[
:default_url
]
@default_style
=
options
[
:default_style
]
@default_style
=
options
[
:default_style
]
@storage
=
options
[
:storage
]
@storage
=
options
[
:storage
]
@
include_updated_timestamp
=
options
[
:include_updated
_timestamp
]
@
use_timestamp
=
options
[
:use
_timestamp
]
@whiny
=
options
[
:whiny_thumbnails
]
||
options
[
:whiny
]
@whiny
=
options
[
:whiny_thumbnails
]
||
options
[
:whiny
]
@convert_options
=
options
[
:convert_options
]
@convert_options
=
options
[
:convert_options
]
@processors
=
options
[
:processors
]
@processors
=
options
[
:processors
]
...
@@ -100,7 +100,7 @@ module Paperclip
...
@@ -100,7 +100,7 @@ module Paperclip
post_process
post_process
# Reset the file size if the original file was reprocessed.
# Reset the file size if the original file was reprocessed.
instance_write
(
:file_size
,
@queued_for_write
[
:original
].
size
.
to_i
)
instance_write
(
:file_size
,
@queued_for_write
[
:original
].
size
.
to_i
)
instance_write
(
:fingerprint
,
@queued_for_write
[
:original
].
fingerprint
)
instance_write
(
:fingerprint
,
@queued_for_write
[
:original
].
fingerprint
)
ensure
ensure
uploaded_file
.
close
if
close_uploaded_file
uploaded_file
.
close
if
close_uploaded_file
...
@@ -110,12 +110,11 @@ module Paperclip
...
@@ -110,12 +110,11 @@ module Paperclip
# this does not necessarily need to point to a file that your web server
# this does not necessarily need to point to a file that your web server
# can access and can point to an action in your app, if you need fine
# can access and can point to an action in your app, if you need fine
# grained security. This is not recommended if you don't need the
# grained security. This is not recommended if you don't need the
# security, however, for performance reasons. set
# security, however, for performance reasons. Set use_timestamp to false
# include_updated_timestamp to false if you want to stop the attachment
# if you want to stop the attachment update time appended to the url
# update time appended to the url
def
url
(
style_name
=
default_style
,
use_timestamp
=
@use_timestamp
)
def
url
(
style_name
=
default_style
,
include_updated_timestamp
=
@include_updated_timestamp
)
url
=
original_filename
.
nil?
?
interpolate
(
@default_url
,
style_name
)
:
interpolate
(
@url
,
style_name
)
url
=
original_filename
.
nil?
?
interpolate
(
@default_url
,
style_name
)
:
interpolate
(
@url
,
style_name
)
include_updated
_timestamp
&&
updated_at
?
[
url
,
updated_at
].
compact
.
join
(
url
.
include?
(
"?"
)
?
"&"
:
"?"
)
:
url
use
_timestamp
&&
updated_at
?
[
url
,
updated_at
].
compact
.
join
(
url
.
include?
(
"?"
)
?
"&"
:
"?"
)
:
url
end
end
# Returns the path of the attachment as defined by the :path option. If the
# Returns the path of the attachment as defined by the :path option. If the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment