I have a web application on App engine, data in Firestore and some images in cloud storage. I can communicate with Firestore fine to get data such as a filename with a file path:
Collection name 'Cats'
'name': 'Black Cat'
'filename': 'cat_black.jpg'
In cloud storage I have a bucket named after the collection in firestore where my cat document is stored. In the bucket there is a jpg file called 'cat_black.jpg'. How do I link to this file in a secure way that only my app engine can fetch and display the photo?
# App Engine Web UI
<img src="https://storage.cloud.google.com/Cats/cat_black.jpg">
Do I need to edit the permissions on the bucket?
edit: I understand my App Engine creates its own bucket so it should by default have access to the bucket, will I need to retrieve the image in Python first? I'm thinking a jinja2 template function for each img src to run an API request and fetch its respective image.