Fixing Amazon uploads to not be hardcoded to https
Amazon S3 uploads are currently hardcoded to use https, where they should probably use whatever protocol the rest of the site is using. Removing the protocol and just using "//" links should accomplish that.
This commit is contained in:
parent
b644509c28
commit
42fdbe2fb6
|
@ -57,7 +57,7 @@ class Upload < ActiveRecord::Base
|
|||
public: true,
|
||||
content_type: file.content_type)
|
||||
upload.width, upload.height = ImageSizer.resize(*image_info.size)
|
||||
upload.url = "https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com#{path}/#{remote_filename}"
|
||||
upload.url = "//#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com#{path}/#{remote_filename}"
|
||||
|
||||
upload.save
|
||||
|
||||
|
|
Loading…
Reference in New Issue