Skip to content

Commit

Permalink
if target_dir is false, can't len to get obj name
Browse files Browse the repository at this point in the history
  • Loading branch information
pbouill authored and MichaIng committed Jan 8, 2024
1 parent 162b696 commit 6b256dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion motioneye/uploadservices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ def upload_file(self, target_dir, filename, camera_name):
# Uploads the given file using a managed uploader, which will split up
# large files automatically and upload parts in parallel.
self.debug(f'uploading file "{filename}" to S3 bucket "{self._bucket}"')
s3.upload_file(filename, self._bucket, filename[len(target_dir) :])
s3.upload_file(filename, self._bucket, os.path.basename(filename))

def test_access(self):
try:
Expand Down

0 comments on commit 6b256dd

Please sign in to comment.