Skip to content

Commit e84bcc1

Browse files
committed
fix: gcp repository upload
1 parent 8b9357a commit e84bcc1

File tree

1 file changed

+3
-1
lines changed
  • projects/fal/src/fal/toolkit/file/providers

1 file changed

+3
-1
lines changed

projects/fal/src/fal/toolkit/file/providers/gcp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def save(self, data: FileData) -> str:
5555
destination_path = os.path.join(self.folder, file_name)
5656

5757
gcp_blob = self.bucket.blob(destination_path)
58-
gcp_blob.upload_from_string(data.data, content_type=data.content_type)
58+
59+
with data.data as file:
60+
gcp_blob.upload_from_file(file, content_type=data.content_type)
5961

6062
if self.url_expiration is None:
6163
return gcp_blob.public_url

0 commit comments

Comments
 (0)