mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 19:14:43 +08:00
Merge branch 'add-list-of-authorized-extensions' of git://github.com/ZogStriP/discourse into ZogStriP-add-list-of-authorized-extensions
Conflicts: app/models/site_setting.rb
This commit is contained in:
@ -51,6 +51,7 @@ class SiteSetting < ActiveRecord::Base
|
||||
setting(:title_prettify, true)
|
||||
|
||||
client_setting(:max_upload_size_kb, 2048)
|
||||
client_setting(:authorized_extensions, '.jpg|.jpeg|.png|.gif')
|
||||
|
||||
# settings only available server side
|
||||
setting(:auto_track_topics_after, 240000)
|
||||
|
@ -69,7 +69,7 @@ class Upload < ActiveRecord::Base
|
||||
# make sure we're at the beginning of the file (FastImage is moving the pointer)
|
||||
file.rewind
|
||||
# store the file and update its url
|
||||
upload.url = Upload.store_file(file, sha1, image_info, upload.id)
|
||||
upload.url = Upload.store_file(file, sha1, image_info, upload.id)
|
||||
# save the url
|
||||
upload.save
|
||||
end
|
||||
|
Reference in New Issue
Block a user