Skip to content

Commit

Permalink
fix: gcp repository upload
Browse files Browse the repository at this point in the history
  • Loading branch information
badayvedat committed Dec 26, 2023
1 parent 41e507a commit a0c81f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/fal/src/fal/toolkit/file/providers/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def save(self, data: FileData) -> str:
destination_path = os.path.join(self.folder, file_name)

gcp_blob = self.bucket.blob(destination_path)
gcp_blob.upload_from_string(data.data, content_type=data.content_type)

with data.data as file:
gcp_blob.upload_from_file(file, content_type=data.content_type)

if self.url_expiration is None:
return gcp_blob.public_url
Expand Down

0 comments on commit a0c81f4

Please sign in to comment.