Feature: Support file type messages on widget and dashboard (#659)
- Adds support for file upload Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com> Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
committed by
GitHub
parent
0afa5c297f
commit
7fcd2d0e85
14
app/helpers/file_type_helper.rb
Normal file
14
app/helpers/file_type_helper.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
module FileTypeHelper
|
||||
def file_type(content_type)
|
||||
return :image if [
|
||||
'image/jpeg',
|
||||
'image/png',
|
||||
'image/svg+xml',
|
||||
'image/gif',
|
||||
'image/tiff',
|
||||
'image/bmp'
|
||||
].include?(content_type)
|
||||
|
||||
:file
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user