mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:01:26 +08:00
FIX: Missing extensions for non-image uploads due to 2b57239389
.
This commit is contained in:
@ -79,7 +79,7 @@ class UploadCreator
|
||||
@upload.sha1 = sha1
|
||||
@upload.url = ""
|
||||
@upload.origin = @opts[:origin][0...1000] if @opts[:origin]
|
||||
@upload.extension = image_type
|
||||
@upload.extension = image_type || File.extname(@filename)[1..10]
|
||||
|
||||
if FileHelper.is_image?(@filename)
|
||||
@upload.width, @upload.height = ImageSizer.resize(*@image_info.size)
|
||||
|
Reference in New Issue
Block a user