Rename FileHelper.is_image? -> FileHelper.is_supported_image?.

This commit is contained in:
Guo Xiang Tan
2018-09-10 10:22:45 +08:00
parent d59e635a77
commit e1b16e445e
11 changed files with 16 additions and 16 deletions

View File

@ -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