-
Notifications
You must be signed in to change notification settings - Fork 127
Description
We are using Cloud Storage via the Firebase SDK and allow clients to upload files to certain paths in our bucket based on the rules we've set up. Additionally, we need to make sure that when a client overwrites a file, the overwrite happens only if the client's notion of which version it is overwriting matches that is on Cloud Storage (if the client tries to overwrite a version that is newer than what it knows about, it goes back and downloads the latest version, merges in its info, and then retries the upload).
Upload preconditions (https://cloud.google.com/storage/docs/generations-preconditions) seem like exactly what we need to solve this problem and avoid some of the race conditions, but we can't figure out how to do them via the Firebase C++ SDK.
My questions are:
- Are preconditions on uploads supported currently? If so, any pointers on how to use them would be most appreciated.
- If they aren't supported, is support planned?
- If they aren't supported yet, we'll need to add support for them ourselves - can anyone suggest a starting point of where might be a good place in the code to insert them? (I'm just looking for any guidance that will help speed us through the process of narrowing down a good spot)
Thanks!