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
91c23385
Commit
91c23385
authored
Mar 07, 2011
by
yar
Committed by
Jon Yurek
Mar 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-processing can be switched on and off at any time
parent
338fc353
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
lib/paperclip/attachment.rb
+3
-1
No files found.
lib/paperclip/attachment.rb
View file @
91c23385
...
@@ -25,6 +25,7 @@ module Paperclip
...
@@ -25,6 +25,7 @@ module Paperclip
end
end
attr_reader
:name
,
:instance
,
:default_style
,
:convert_options
,
:queued_for_write
,
:whiny
,
:options
attr_reader
:name
,
:instance
,
:default_style
,
:convert_options
,
:queued_for_write
,
:whiny
,
:options
attr_accessor
:post_processing
# Creates an Attachment object. +name+ is the name of the attachment,
# Creates an Attachment object. +name+ is the name of the attachment,
# +instance+ is the ActiveRecord object instance it's attached to, and
# +instance+ is the ActiveRecord object instance it's attached to, and
...
@@ -53,6 +54,7 @@ module Paperclip
...
@@ -53,6 +54,7 @@ module Paperclip
@convert_options
=
options
[
:convert_options
]
@convert_options
=
options
[
:convert_options
]
@processors
=
options
[
:processors
]
@processors
=
options
[
:processors
]
@options
=
options
@options
=
options
@post_processing
=
true
@queued_for_delete
=
[]
@queued_for_delete
=
[]
@queued_for_write
=
{}
@queued_for_write
=
{}
@errors
=
{}
@errors
=
{}
...
@@ -105,7 +107,7 @@ module Paperclip
...
@@ -105,7 +107,7 @@ module Paperclip
@dirty
=
true
@dirty
=
true
post_process
post_process
if
@post_processing
# 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
)
...
...
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