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:
Shane Liesegang 2013-04-19 22:05:51 -03:00
parent b644509c28
commit 42fdbe2fb6
1 changed files with 1 additions and 1 deletions

View File

@ -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