Problem
Hello everyone. I am attempting to obtain the file size of an object using the google-cloud
python library. This is my current code.
from google.cloud import storage
client = storage.Client()
bucket = client.get_bucket("example-bucket-name")
object = bucket.blob("example-object-name.jpg")
print(object.exists())
>>> True
print(object.chunk_size)
>>> None
It appears to me that the google-cloud
library is choosing not to load data into the attributes such as chunk_size
, content_type
, etc.
Question
How can I make the library explicitly load actual data into the metadata attributes of the blob, instead of defaulting everything to None
?
python
andpython-3.x
tags since this is not a python issue, per se. – Lycaon