2
votes

Suppose I deploy a Google Cloud Function with Python 3 to download an object from Google Cloud Storage. The code to download an object is documented here. My question is: if I call this function, where does the file get downloaded to? Can I use it then "locally" in the same script after downloading it?

My specific goal is to download a .mp3 file and then using mutagen to read its metadata.

1

1 Answers

4
votes

Your code specifies the download location when you call the Cloud Storage API. The file location is never determined automatically.

The only writable path in Cloud Functions is /tmp, which is a memory-based filesystem. Be sure to read the documentation about that.