mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:31:13 +08:00
FIX: Upload#short_url
generates incorrect URL when extension is nil
.
This commit is contained in:
@ -361,7 +361,7 @@ class Upload < ActiveRecord::Base
|
||||
private
|
||||
|
||||
def short_url_basename
|
||||
"#{Upload.base62_sha1(sha1)}.#{extension}"
|
||||
"#{Upload.base62_sha1(sha1)}#{extension.present? ? ".#{extension}" : ""}"
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user