1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00

(bug) #content_type_whitelist is instead by #content_type_allowlist

This commit is contained in:
Du Peng 2024-03-11 12:46:39 +01:00
parent f07164afb2
commit 523de4f3f7
17 changed files with 34 additions and 32 deletions

View File

@ -4,6 +4,8 @@
- Fix a bug: set settlement by cash by default for local payment mean
- updates translations
- #content_type_whitelist is instead by #content_type_allowlist
- #extension_whitelist is instead by #extension_allowlist
- [TODO DEPLOY] `rails fablab:setup:build_accounting_lines`
## v6.3.15 2024 February 29

View File

@ -48,11 +48,11 @@ class CustomAssetsUploader < 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_whitelist
def extension_allowlist
%w[pdf png jpeg jpg ico]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}, 'application/pdf']
end

View File

@ -41,11 +41,11 @@ class EventFileUploader < 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_whitelist
def extension_allowlist
%w[pdf]
end
def content_type_whitelist
def content_type_allowlist
%w[application/pdf]
end

View File

@ -59,11 +59,11 @@ class EventImageUploader < 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_whitelist
def extension_allowlist
%w[jpg jpeg gif png]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}]
end

View File

@ -22,11 +22,11 @@ class ImportUploader < 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_whitelist
def extension_allowlist
%w[csv]
end
def content_type_whitelist
def content_type_allowlist
%w[text/csv]
end

View File

@ -41,11 +41,11 @@ class MachineFileUploader < 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_whitelist
def extension_allowlist
%w[pdf]
end
def content_type_whitelist
def content_type_allowlist
%w[application/pdf]
end

View File

@ -51,11 +51,11 @@ class MachineImageUploader < 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_whitelist
def extension_allowlist
%w[jpg jpeg gif png]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}]
end

View File

@ -41,11 +41,11 @@ class PlanFileUploader < 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_whitelist
def extension_allowlist
%w[pdf png jpeg jpg]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}, 'application/pdf']
end

View File

@ -46,11 +46,11 @@ class ProductFileUploader < 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_whitelist
def extension_allowlist
%w[pdf]
end
def content_type_whitelist
def content_type_allowlist
['application/pdf']
end

View File

@ -39,11 +39,11 @@ class ProductImageUploader < 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_whitelist
def extension_allowlist
%w[jpg jpeg gif png webp]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}]
end

View File

@ -23,11 +23,11 @@ class ProjectCaoUploader < 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_whitelist
def extension_allowlist
Setting.get('allowed_cad_extensions').split(' ')
end
def content_type_whitelist
def content_type_allowlist
Setting.get('allowed_cad_mime_types').split(' ')
end
end

View File

@ -29,11 +29,11 @@ class ProjectImageUploader < 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_whitelist
def extension_allowlist
%w[jpg jpeg gif png]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}]
end

View File

@ -41,11 +41,11 @@ class SpaceFileUploader < 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_whitelist
def extension_allowlist
%w[pdf]
end
def content_type_whitelist
def content_type_allowlist
%w[application/pdf]
end

View File

@ -51,11 +51,11 @@ class SpaceImageUploader < 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_whitelist
def extension_allowlist
%w[jpg jpeg gif png]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}]
end

View File

@ -47,11 +47,11 @@ class SupportingDocumentFileUploader < 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_whitelist
def extension_allowlist
%w[pdf png jpeg jpg]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}, 'application/pdf']
end

View File

@ -51,11 +51,11 @@ class TrainingImageUploader < 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_whitelist
def extension_allowlist
%w[jpg jpeg gif png]
end
def content_type_whitelist
def content_type_allowlist
[%r{image/}]
end

View File

@ -55,11 +55,11 @@ class UserAvatarUploader < 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_whitelist
def extension_allowlist
%w[jpg jpeg gif png]
end
def content_type_whitelist
def content_type_allowlist
%w[image/jpeg image/gif image/png]
end