My AppEngine project has an API method that sends a resumable URL to an Android Client which then uses that resumable URL to upload an image.
I have another API method that create and returns a signed URL. In the Signed URL you must specify the Google Cloud Storage bucket and object name. However, that object may not exist, in which case, the signed URL will of course not work.
How can I quickly check if an object exists (in a bucket) in my App Engine backend before issuing the Signed URL?
EDIT: My App Engine project is a Cloud Endpoints project.
"profile_photo_user_" + username
in GCS. However, new users may not have yet uploaded a photo. Either way, I get their profile photo. So the signed URL could point to an image that doesn't exist yet. Given your comment is sounds like I need to rethink this strategy of storing/retrieving profile photos :) I just have no way of knowing when a user uploads an image via the resumable URL in order to write an entry to datastore of the obj name for example. – MicrogetUploadUrl
method, you will get a callback to your server with the file details after the upload is competed, and you can update the database at that point (e.g. set "photo available" to "true"). – Andrei Volgin