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

222
Visualizações
AWS S3 API - Objects doesn't contains Metadata

trying to figure AWS S3 API and failing miserably...

I currently got a bucket which consist lots of videos.

I need to request all the videos as an object, that will have the video meta-data which I set once uploading, and the link to share the video.

Problem is I'm getting the object without any of the above...

What Iv'e got so far -

AWS.config.update({accessKeyId: 'id', secretAccessKey: 'key', region: 'eu-
west-1'});
var s3 = new AWS.S3();

var params = { 
 Bucket: 'Bucket-name',
 Delimiter: '/',
 Prefix: 'resource/folder-with-videos/'

}

s3.listObjects(params, function (err, data) {
 if(err)throw err;
 console.log(data);
});

Thanks for reading :)

UPDATE - found that when using getObject and adding ExposeHeader to the CORS setting I can indeed get the metadata I set. problem is getObject only works on a specific Object (video in my case).

any Idea how I can get all the object like listObject and have values of each object like I do on getObject?

Only solution I can think of is doing listObject to get a list of all the objects, and then by this result to do for each object an getObject ajax?... rip UX thanks :)

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

A couple of things to sort out first.

As per the documentation, http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#listObjects-property listObjects API returns exactly what is mentioned in the callback parameters. Using a delimiter causes the S3 to list objects only one level below the prefix given. It won't traverse all objects recursively.

In order to get the URL, you can use http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property. I am not really sure what you meant by meta-data.

about 4 years ago · Santiago Trujillo 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