0

I would like to generate PUT signed URL that gives permission to upload many files to the specific folder. Then I would like to specify the actual filename in the folder during the file upload. How can I achieve that in Java using Google Cloud Storage client?

Ideally, the client that uploads files with generated URL could be written in any language.

Nominalista
  • 4,632
  • 11
  • 43
  • 102
  • Does this answer your question? [GCS Signed Urls with subfolder in bucket](https://stackoverflow.com/questions/40423370/gcs-signed-urls-with-subfolder-in-bucket) – Dharmaraj May 05 '23 at 17:37
  • The above question is related to GET signed URL. Here I was asking about PUT. – Nominalista May 05 '23 at 20:58

1 Answers1

2

Currently, the Google Cloud Storage API does not support creating a signed URL based on a prefix.

A technical item to note is that folders do not exist in Google Cloud Storage. The namespace is flat. The concept of folders and separators (/) are just object name characters. All objects are located in the bucket root namespace.

Note: Cloud CDN does support URLPrefix for signed URLs. This will not help you with PUT requests but might be useful information for other readers link interested in content caching.

John Hanley
  • 74,467
  • 6
  • 95
  • 159