Add JPG and PNG image on cerfa and piece justificative uploader
This commit is contained in:
parent
ddeaf5abf3
commit
d26feb4c72
3 changed files with 6 additions and 4 deletions
|
@ -23,7 +23,7 @@ class PieceJustificative < ActiveRecord::Base
|
|||
(RemoteDownloader.new content.filename).url
|
||||
else
|
||||
(LocalDownloader.new content.path,
|
||||
(type_de_piece_justificative.nil? ? content.original_filename : type_de_piece_justificative.libelle)).url
|
||||
(type_de_piece_justificative.nil? ? content.original_filename : type_de_piece_justificative.libelle)).url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -38,7 +38,9 @@ class PieceJustificative < ActiveRecord::Base
|
|||
application/vnd.openxmlformats-officedocument.presentationml.presentation,
|
||||
application/vnd.oasis.opendocument.text,
|
||||
application/vnd.oasis.opendocument.presentation,
|
||||
application/vnd.oasis.opendocument.spreadsheet
|
||||
application/vnd.oasis.opendocument.spreadsheet,
|
||||
image/png,
|
||||
image/jpeg
|
||||
"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ class CerfaUploader < CarrierWave::Uploader::Base
|
|||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
%w(pdf doc docx xls xlsx ppt pptx odt ods odp)
|
||||
%w(pdf doc docx xls xlsx ppt pptx odt ods odp jpg jpeg png)
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
|
@ -25,7 +25,7 @@ class PieceJustificativeUploader < CarrierWave::Uploader::Base
|
|||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
%w(pdf doc docx xls xlsx ppt pptx odt ods odp)
|
||||
%w(pdf doc docx xls xlsx ppt pptx odt ods odp jpg jpeg png)
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
Loading…
Add table
Reference in a new issue