Uploading Image File To Google Bucket In Python
I am attempting to create a function in Python in which I pass a filename and an image object, which I want to be uploaded to a Google storage bucket. I have the bucket already cre
Solution 1:
As per the Github issue, you should provide chunk_size
parameter for stream upload.
blob = self.bucket.blob(filename, chunk_size=262144) # 256KB
blob.upload_from_file(image)
chunk_size (int) – The size of a chunk of data whenever iterating (in bytes). This must be a multiple of 256 KB per the API specification.
Post a Comment for "Uploading Image File To Google Bucket In Python"