Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFTP_BASE_URL #1368

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/backends/sftp.rst
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading