I'm using Google Cloud Python API to upload blobs into buckets, which is working just fine.
However, for my specific use case, I need to prevent files from being overwritten. Instead of doing it in two go's (1st request to check if the file exists, 2nd upload the blob), I would much prefer to do it in one shot.
Apparently this can be done by using some conditional HTTP headers, e.g. If-None-Match: '*'
.
Regretfully, the Google Cloud Python API doesn't seem to allow for any custom headers.
Any ideas on how I could go about this?
Thanks