I have a compute instance on Google Cloud running a web app written in Coldfusion. I would like to leverage the great app engine functionality that Google offers for the upload, storage, modification and, most importantly, secure serving of images and files from buckets in Google Cloud Storage.
Is it possible to make a request from my compute instance to the app engine that will reply with the fully signed URL of the requested image?
I was assuming that if I had uploaded foo.jpg to the bucket and then could request that from app engine I could then use the returned URL as my img src. I would have all image names saved on Cloud SQL with their appropriate bucket address.
Take a look at the ImageService rather than appengine, it does exactly what you need:
In java it looks like this:
//whatever your file path is
String fullGcsName "/gs/bucket_name/file_name.jpg";
ServingUrlOptions options = ServingUrlOptions.Builder.withGoogleStorageFileName(fullGcsName);
ImagesService imagesService = ImagesServiceFactory.getImagesService();
String servingUrl = imagesService.getServingUrl(options);
When the client requests the 'servingUrl' sizing options can be added if you want to serve as a thumbnail for example.