Skip to content

Commit

Permalink
[sftp] Add SFTP_BASE_URL setting (#1368)
Browse files Browse the repository at this point in the history
  • Loading branch information
Toruitas committed Mar 18, 2024
1 parent ce34cf1 commit e7f1911
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/backends/sftp.rst
Expand Up @@ -117,7 +117,7 @@ Settings

Absolute path of know host file, if it isn't set ``"~/.ssh/known_hosts"`` will be used.

``base_url``
``base_url`` or ``SFTP_BASE_URL``

Default: Django ``MEDIA_URL`` setting

Expand Down
2 changes: 1 addition & 1 deletion storages/backends/sftpstorage.py
Expand Up @@ -49,7 +49,7 @@ def get_default_settings(self):
"gid": setting("SFTP_STORAGE_GID"),
"known_host_file": setting("SFTP_KNOWN_HOST_FILE"),
"root_path": setting("SFTP_STORAGE_ROOT", ""),
"base_url": setting("MEDIA_URL"),
"base_url": setting("SFTP_BASE_URL") or setting("MEDIA_URL"),
}

def _connect(self):
Expand Down

0 comments on commit e7f1911

Please sign in to comment.