mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 16:02:46 +08: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:
parent
5d47d1833b
commit
a3938f98f8
|
@ -98,7 +98,7 @@ class UploadsController < ApplicationController
|
|||
if Discourse.store.internal?
|
||||
send_file_local_upload(upload)
|
||||
else
|
||||
redirect_to Discourse.store.path_for(upload)
|
||||
redirect_to upload.url
|
||||
end
|
||||
else
|
||||
render_404
|
||||
|
|
|
@ -102,12 +102,7 @@ module FileStore
|
|||
|
||||
def path_for(upload)
|
||||
url = upload&.url
|
||||
|
||||
if url && url[/^\/[^\/]/]
|
||||
FileStore::LocalStore.new.path_for(upload)
|
||||
else
|
||||
url
|
||||
end
|
||||
FileStore::LocalStore.new.path_for(upload) if url && url[/^\/[^\/]/]
|
||||
end
|
||||
|
||||
def cdn_url(url)
|
||||
|
|
Loading…
Reference in New Issue
Block a user