Skip to content

Commit

Permalink
adding file obj upload function for s3
Browse files Browse the repository at this point in the history
  • Loading branch information
avishmehta68710 committed Sep 19, 2024
1 parent 0ccb296 commit 75d595a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion basepair/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Exposing the storage wrapper

__title__ = 'basepair'
__version__ = '2.1.12'
__version__ = '2.1.12a'
__copyright__ = 'Copyright [2017] - [2024] Basepair INC'


Expand Down
4 changes: 2 additions & 2 deletions basepair/modules/storage/drivers/aws_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ def upload(self, file_name, full_path, **kwargs):
"""Upload file to storage"""
return self.s3_service.upload_file(file_name, full_path, **kwargs)

def upload_file(self, fileobj, key, **kwargs):
def upload_file_obj(self, fileobj, file_path, **kwargs):
"""Upload file object to storage"""
return self.s3_service.upload_file_obj(fileobj, key, **kwargs)
return self.s3_service.upload_file_obj(fileobj, file_path, **kwargs)
4 changes: 2 additions & 2 deletions basepair/modules/storage/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ def upload(self, file_name, full_path, **kwargs):
"""Upload file to storage"""
return self.driver.upload(file_name, full_path, **kwargs)

def upload_fileobj(self, fileobj, uri):
def upload_file_obj(self, file_obj, file_path, **kwargs):
"""Upload file object to storage"""
return self.driver.upload_fileobj(fileobj, uri)
return self.driver.upload_file_obj(file_obj, file_path, **kwargs)

0 comments on commit 75d595a

Please sign in to comment.