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
13895667
Commit
13895667
authored
Jul 08, 2008
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't #reprocess! if there is no file.
parent
311732b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
lib/paperclip/attachment.rb
+7
-6
No files found.
lib/paperclip/attachment.rb
View file @
13895667
...
@@ -159,14 +159,15 @@ module Paperclip
...
@@ -159,14 +159,15 @@ module Paperclip
# again.
# again.
def
reprocess!
def
reprocess!
new_original
=
Tempfile
.
new
(
"paperclip-reprocess"
)
new_original
=
Tempfile
.
new
(
"paperclip-reprocess"
)
old_original
=
to_file
(
:original
)
if
old_original
=
to_file
(
:original
)
new_original
.
write
(
old_original
.
read
)
new_original
.
write
(
old_original
.
read
)
new_original
.
rewind
new_original
.
rewind
@queued_for_write
=
{
:original
=>
new_original
}
@queued_for_write
=
{
:original
=>
new_original
}
post_process
post_process
old_original
.
close
if
old_original
.
respond_to?
(
:close
)
old_original
.
close
if
old_original
.
respond_to?
(
:close
)
end
end
end
private
private
...
...
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