Skip to content

Commit

Permalink
Merge pull request #1902 from asideofcode-dev/patch-1
Browse files Browse the repository at this point in the history
Update uploaders to use extension_allowlist
  • Loading branch information
matyikriszta authored Aug 14, 2023
2 parents 7f9251d + a16d555 commit 4585db1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/uploaders/avatar_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def store_dir
process resize_to_fit: [178, 65]
end

def extension_white_list
def extension_allowlist
%w[jpg jpeg gif png]
end

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/image_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def store_dir
process resize_to_fit: [1200, 800]
end

# Add a white list of extensions which are allowed to be uploaded.
# Add an allow list of extensions which are allowed to be uploaded.
# For images you might use something like this:
def extension_white_list
def extension_allowlist
%w[jpg jpeg png]
end

Expand Down

0 comments on commit 4585db1

Please sign in to comment.