mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-22 15:21:01 +00:00
parent
a3bc7ff196
commit
7f838433ed
1 changed files with 5 additions and 0 deletions
|
@ -310,6 +310,11 @@ if SETUP.MEDIA_BACKEND:
|
||||||
if parsed.hostname is not None:
|
if parsed.hostname is not None:
|
||||||
port = parsed.port or 443
|
port = parsed.port or 443
|
||||||
AWS_S3_ENDPOINT_URL = f"https://{parsed.hostname}:{port}"
|
AWS_S3_ENDPOINT_URL = f"https://{parsed.hostname}:{port}"
|
||||||
|
elif parsed.scheme == "local":
|
||||||
|
if not (MEDIA_ROOT and MEDIA_URL):
|
||||||
|
raise ValueError(
|
||||||
|
"You must provide MEDIA_ROOT and MEDIA_URL for a local media backend"
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unsupported media backend {parsed.scheme}")
|
raise ValueError(f"Unsupported media backend {parsed.scheme}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue