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
c40d947e
Commit
c40d947e
authored
May 07, 2008
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed ENOENT to NotIdentifiedByImageMagick, which should work with whiny_thumbnails
parent
1b099cda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
lib/paperclip.rb
+3
-0
lib/paperclip/attachment.rb
+1
-3
lib/paperclip/geometry.rb
+1
-1
No files found.
lib/paperclip.rb
View file @
c40d947e
...
...
@@ -65,6 +65,9 @@ module Paperclip
class
PaperclipError
<
StandardError
#:nodoc:
end
class
NotIdentifiedByImageMagickError
<
PaperclipError
#:nodoc:
end
module
ClassMethods
# +has_attached_file+ gives the class it is called on an attribute that maps to a file. This
# is typically a file stored somewhere on the filesystem and has been uploaded by a user.
...
...
lib/paperclip/attachment.rb
View file @
c40d947e
...
...
@@ -189,10 +189,8 @@ module Paperclip
dimensions
,
format
,
@whiny_thumnails
)
rescue
Errno
::
ENOENT
=>
e
@errors
<<
"could not be processed because the file does not exist."
rescue
PaperclipError
=>
e
@errors
<<
e
.
message
@errors
<<
e
.
message
if
@whiny_thumbnails
end
end
end
...
...
lib/paperclip/geometry.rb
View file @
c40d947e
...
...
@@ -18,7 +18,7 @@ module Paperclip
def
self
.
from_file
file
file
=
file
.
path
if
file
.
respond_to?
"path"
parse
(
`
#{
Paperclip
.
path_for_command
(
'identify'
)
}
"
#{
file
}
"`
)
||
raise
(
Errno
::
ENOENT
,
file
)
raise
NotIdentifiedByImageMagickError
,
"
#{
file
}
is not recognized by the 'identify' command."
end
# Parses a "WxH" formatted string, where W is the width and H is the height.
...
...
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