mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: Gravatar uploads being dependent on authorized_extensions.
This commit is contained in:

committed by
Guo Xiang Tan

parent
20bc4a38a5
commit
7bd93eba3e
@ -21,6 +21,7 @@ class UploadCreator
|
||||
# - for_private_message (boolean)
|
||||
# - pasted (boolean)
|
||||
# - for_export (boolean)
|
||||
# - for_gravatar (boolean)
|
||||
def initialize(file, filename, opts = {})
|
||||
@file = file
|
||||
@filename = (filename || "").gsub(/[^[:print:]]/, "")
|
||||
@ -116,6 +117,7 @@ class UploadCreator
|
||||
@upload.for_theme = true if @opts[:for_theme]
|
||||
@upload.for_export = true if @opts[:for_export]
|
||||
@upload.for_site_setting = true if @opts[:for_site_setting]
|
||||
@upload.for_gravatar = true if @opts[:for_gravatar]
|
||||
|
||||
return @upload unless @upload.save
|
||||
|
||||
|
Reference in New Issue
Block a user