From 42fdbe2fb6742b916dac2e262bf048ff3f83dd83 Mon Sep 17 00:00:00 2001 From: Shane Liesegang Date: Fri, 19 Apr 2013 22:05:51 -0300 Subject: [PATCH] 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. --- app/models/upload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/upload.rb b/app/models/upload.rb index bbd68209a..b15e9f736 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -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