mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert changes to FileStore::S3Store#path_for in f0620e7118.
There are some places in the code base that assumes the method should return nil.
This commit is contained in:
@@ -98,7 +98,7 @@ class UploadsController < ApplicationController
|
|||||||
if Discourse.store.internal?
|
if Discourse.store.internal?
|
||||||
send_file_local_upload(upload)
|
send_file_local_upload(upload)
|
||||||
else
|
else
|
||||||
redirect_to Discourse.store.path_for(upload)
|
redirect_to upload.url
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
render_404
|
render_404
|
||||||
|
|||||||
@@ -102,12 +102,7 @@ module FileStore
|
|||||||
|
|
||||||
def path_for(upload)
|
def path_for(upload)
|
||||||
url = upload&.url
|
url = upload&.url
|
||||||
|
FileStore::LocalStore.new.path_for(upload) if url && url[/^\/[^\/]/]
|
||||||
if url && url[/^\/[^\/]/]
|
|
||||||
FileStore::LocalStore.new.path_for(upload)
|
|
||||||
else
|
|
||||||
url
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def cdn_url(url)
|
def cdn_url(url)
|
||||||
|
|||||||
Reference in New Issue
Block a user