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

165
Visualizações
How do you download an object from Google Cloud Storage with a gs:// URI in Node.js?

I have gs:// string URIs to objects in Google Cloud Storage (see this question for an explanation of what gs:// URIs mean). How do I download these objects using Node.js? The docs only contain examples with the bucket name and file path:

const {Storage} = require('@google-cloud/storage');
const storage = new Storage();
const myBucket = storage.bucket('my-bucket');

const file = myBucket.file('my-file');

Can I make a file directly from a gs:// URI (passed as a string), or do I need to manually parse the URI into a bucket name and file path?

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

0

What you are looking for is getting a file from the Cloud Storage using the object URI i.e. gs://bucket_name/file_name. The answer to this is it is not possible to do the task you are looking for. Also, the official client library for Cloud Storage in NodeJS does not provide any such method to do it. So you have to parse the object URI and first get the bucket using the Storage client, then use the bucket to get the object as mentioned here or in this github repo.

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