mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Rename FileHelper.is_image?
-> FileHelper.is_supported_image?
.
This commit is contained in:
parent
d59e635a77
commit
e1b16e445e
11 changed files with 16 additions and 16 deletions
|
@ -72,7 +72,7 @@ class UploadsController < ApplicationController
|
|||
content_type: MiniMime.lookup_by_filename(upload.original_filename)&.content_type,
|
||||
}
|
||||
opts[:disposition] = "inline" if params[:inline]
|
||||
opts[:disposition] ||= "attachment" unless FileHelper.is_image?(upload.original_filename)
|
||||
opts[:disposition] ||= "attachment" unless FileHelper.is_supported_image?(upload.original_filename)
|
||||
send_file(Discourse.store.path_for(upload), opts)
|
||||
else
|
||||
render_404
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue