diff --git a/frigate/http.py b/frigate/http.py index 6e9b2a82b..0e6feb8c7 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -1323,7 +1323,7 @@ def recordings(camera_name): def recording_clip(camera_name, start_ts, end_ts): download = request.args.get("download", type=bool) - if current_app.frigate_config.storage.s3.enabled: + if current_app.frigate_config.storage.s3.enabled or current_app.frigate_config.storage.s3.archive: s3 = StorageS3(current_app.frigate_config) recordings = ( diff --git a/frigate/storage.py b/frigate/storage.py index 5f00aa6dc..6e02a59df 100644 --- a/frigate/storage.py +++ b/frigate/storage.py @@ -26,7 +26,7 @@ bandwidth_equation = Recordings.segment_size / ( class StorageS3: def __init__(self, config: FrigateConfig) -> None: self.config = config - if self.config.storage.s3.enabled: + if self.config.storage.s3.enabled or self.config.storage.s3.archive: if self.config.storage.s3.endpoint_url.startswith('http://'): session = boto_session() session.set_config_variable('s3', @@ -65,7 +65,7 @@ class StorageS3: return s3_filename def download_file_from_s3(self, s3_file_name) -> str: - if self.config.storage.s3.enabled: + if self.config.storage.s3.enabled or self.config.storage.s3.archive: # Create a temporary directory temp_dir = tempfile.gettempdir()