Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
How should I configure a Javascript Webapp so that it can use a Web Browser to view files in Google Cloud storage

My Javascript Webapp enables logged-in users to upload PDF files into the Google Cloud and store them in a Cloud Storage bucket. I'd like the wider public to be able to view the files they've just uploaded, but this is proving more difficult than I expected.

An HTML button firing an onclick function for a window.open call hard-coded with an HREF referencing the full Cloud Storage URL for the file together with an access token does the trick. I can get this information from the Storage tab in the Firebase console, but I'm at a loss to find a way of configuring this arrangement dynamically.

The URL part doesn't seem to be a problem, but I would appreciate advice on how I can obtain a suitable access token.

Alternatively, can anyone suggest how I might lower the bar on GCP security settings for my Cloud Storage files so that a casual user doesn't need a token in the first place? I have tried using the Cloud Security console to set permissions but have still to find a combination of settings that gives the desired outcome.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The answer is provided by Google's Make data public document.

This tells you how to make either individual files or the entire content of a bucket publicly readable.

In my case, the second approach was clearly what I needed. I created a new bucket specifically for the content I wanted to share and followed the instructions closely - they're complex and easily misunderstood. At several points, you need to select settings from drop-down lists but, while these lists are populated, you don't see the items you're looking for until you start typing in the keywords detailed in the instructions.

With the new permission in place, my files were accessible by URLs of the form https://storage.googleapis.com/[Bucket name]/[File name]

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda