fix get from url for external uploads without CDN

This commit is contained in:
Maja Komel
2018-06-13 16:21:28 +10:00
committed by Sam
parent 0c2f590c64
commit 6c9190357c
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -106,6 +106,13 @@ describe Upload do
SiteSetting.enable_s3_uploads = false
end
it "should return the right upload when using base url (not CDN) for s3" do
upload
url = "https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com#{path}"
expect(Upload.get_from_url(url)).to eq(upload)
end
it "should return the right upload when using a CDN for s3" do
upload
s3_cdn_url = 'https://mycdn.slowly.net'