Skip to content
Merged
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
8 changes: 7 additions & 1 deletion netbox/core/data_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def fetch(self):
region_name=self._region_name,
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key,
config=self.config
config=self.config,
endpoint_url=self._endpoint_url
)
bucket = s3.Bucket(self._bucket_name)

Expand All @@ -176,6 +177,11 @@ def _bucket_name(self):
url_path = urlparse(self.url).path.lstrip('/')
return url_path.split('/')[0]

@property
def _endpoint_url(self):
url_path = urlparse(self.url)
return url_path._replace(params="", fragment="", query="", path="").geturl()

@property
def _remote_path(self):
url_path = urlparse(self.url).path.lstrip('/')
Expand Down