How to make objects in Google cloud storage open instead of download?

1.5k views Asked by At

I want users to be able to open the files stored in GCP's Storage without the need to download them.

1

There are 1 answers

0
guillaume blaquiere On BEST ANSWER

You can change the metadata of your file,

  • Either in the GUI by clicking on the 3 dots at the end of the file's line and then on Edit metadata
  • Or by adding them with the gsutil command

You have to change the content-type of your file. If this content type is known by your browser (or one of its extensions), the file is directly displayed into the browser. Else, it is downloaded.

The content type is set by default when you upload the file.