mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
Rename FileHelper.is_image?
-> FileHelper.is_supported_image?
.
This commit is contained in:
@ -39,7 +39,7 @@ module FileStore
|
||||
content_type: opts[:content_type].presence || MiniMime.lookup_by_filename(filename)&.content_type
|
||||
}
|
||||
# add a "content disposition" header for "attachments"
|
||||
options[:content_disposition] = "attachment; filename=\"#{filename}\"" unless FileHelper.is_image?(filename)
|
||||
options[:content_disposition] = "attachment; filename=\"#{filename}\"" unless FileHelper.is_supported_image?(filename)
|
||||
# if this fails, it will throw an exception
|
||||
path = @s3_helper.upload(file, path, options)
|
||||
# return the upload url
|
||||
|
Reference in New Issue
Block a user