mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add extraction of upload extension. Add rspec test for search of post
with upload by extension.
This commit is contained in:
@@ -73,6 +73,7 @@ class UploadCreator
|
||||
@upload.sha1 = sha1
|
||||
@upload.url = ""
|
||||
@upload.origin = @opts[:origin][0...1000] if @opts[:origin]
|
||||
@upload.extension = 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