I am using gsutil to create pre-signed URLs for upload. When naming the object in the bucket, I can successfully upload. The following snipit from gsutil works fine with a curl PUT:
gsutil signurl -m PUT -d 10m -r eu ~/.ssh/mycreds.json gs://cjreyn-bucket-0/myobjectname.txt
However, when specifying just the bucket name, instead of an object within it, uploading an arbitrary object doesn't work:
gsutil signurl -m PUT -d 10m -r eu ~/.ssh/mycreds.json gs://cjreyn-bucket-0/
This returns the follwing from curl:
<?xml version='1.0' encoding='UTF-8'?><Error><Code>BucketAlreadyOwnedByYou</Code><Message>Your previous request to create the named bucket succeeded and you already own it.</Message></Error>
My curl line is as follows (signed URL replaced with for brevity):
curl -X PUT --upload-file myobj.txt "<mysignedurl>"
Is it even possible to create signed URLs for upload and download to/from the whole bucket, rather than for each object within it?