Skip to content

Commit

Permalink
feat(storage): blob upload with content type (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
dodeca-6-tope authored Feb 16, 2024
1 parent 30e4632 commit 81e5b5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion storage/gcloud/aio/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,15 @@ async def download(

async def upload(
self, data: Any,
content_type: Optional[str] = None,
session: Optional[Session] = None,
) -> Dict[str, Any]:
metadata = await self.bucket.storage.upload(
self.bucket.name, self.name, data, session=session,
self.bucket.name,
self.name,
data,
content_type=content_type,
session=session,
)

self.__dict__.update(metadata)
Expand Down

0 comments on commit 81e5b5c

Please sign in to comment.