Carrierwave: change the method name to extension_whitelist for filter uploader file extension
This commit is contained in:
parent
3435349b66
commit
f0ed61cce8
5 changed files with 6 additions and 6 deletions
|
@ -20,7 +20,7 @@ class AttestationTemplateLogoUploader < BaseUploader
|
|||
|
||||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
def extension_whitelist
|
||||
['jpg', 'jpeg', 'png']
|
||||
end
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class AttestationTemplateSignatureUploader < BaseUploader
|
|||
|
||||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
def extension_whitelist
|
||||
['jpg', 'jpeg', 'png']
|
||||
end
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@ class CommentaireFileUploader < BaseUploader
|
|||
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
||||
end
|
||||
|
||||
def extension_white_list
|
||||
def extension_whitelist
|
||||
['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', 'jpg', 'jpeg', 'png', 'zip', 'txt']
|
||||
end
|
||||
|
||||
def accept_extension_list
|
||||
extension_white_list.map { |e| ".#{e}" }.join(",")
|
||||
extension_whitelist.map { |e| ".#{e}" }.join(",")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ class PieceJustificativeUploader < BaseUploader
|
|||
|
||||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
def extension_whitelist
|
||||
['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', 'jpg', 'jpeg', 'png']
|
||||
end
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class ProcedureLogoUploader < BaseUploader
|
|||
|
||||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
def extension_whitelist
|
||||
['jpg', 'jpeg', 'png']
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue