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
d199e584
Commit
d199e584
authored
Jun 30, 2011
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation for strange content type received from Internet Explorer
Closes #68
parent
f7a5b91b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
lib/paperclip.rb
+5
-1
No files found.
lib/paperclip.rb
View file @
d199e584
...
...
@@ -351,6 +351,10 @@ module Paperclip
# NOTE: If you do not specify an [attachment]_content_type field on your
# model, content_type validation will work _ONLY upon assignment_ and
# re-validation after the instance has been reloaded will always succeed.
#
# WARNING: There's also some known issue with the content type sent by
# Internet Explorer might not be the same as other browsers. You can look at
# https://github.com/thoughtbot/paperclip/issues/68 for more information.
def
validates_attachment_content_type
name
,
options
=
{}
validation_options
=
options
.
dup
allowed_types
=
[
validation_options
[
:content_type
]].
flatten
...
...
@@ -401,7 +405,7 @@ module Paperclip
Paperclip
.
log
(
"Deleting attachments."
)
each_attachment
do
|
name
,
attachment
|
attachment
.
send
(
:queue_existing_for_delete
)
attachment
.
send
(
:flush_deletes
)
attachment
.
send
(
:flush_deletes
)
end
end
end
...
...
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