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
db5998b7
Commit
db5998b7
authored
Mar 23, 2016
by
Tute Costa
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2127 from bdewater/master
Update example to add mime-types to file extensions
parents
cf409665
d20f7d28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
README.md
+4
-5
No files found.
README.md
View file @
db5998b7
...
...
@@ -429,14 +429,13 @@ will not cause errors to be raised.
This can sometimes cause false validation errors in applications that use custom
file extensions. In these cases you may wish to add your custom extension to the
list of file extensions allowed for your MIME type configured by the
`mime-types`
gem:
list of content type mappings by creating
`config/initializers/paperclip.rb`
:
```
ruby
# Allow ".foo" as an extension for files with the MIME type "text/plain".
text_plain
=
MIME
::
Types
[
"text/plain"
].
first
text_plain
.
extensions
<<
"foo"
MIME
::
Types
.
index_extensions
text_plain
Paperclip
.
options
[
:content_type_mappings
]
=
{
foo:
%w(text/plain)
}
```
---
...
...
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