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

217
Visualizações
aws-amplify S3 Storage uploads files but put them as "private" despite of explicit public access configuration

I'm trying to upload files to AWS S3 Storage with public access but despite of explicitly configure the public access on the code the files are uploaded as private instead. I'm using the aws-amplify package on an Angular app.

This is the code I'm using:

  public onSubmit() {
    this.form.disable();
    const contentType: string = this.imgFile.extension === 'png' ? 'image/png' : 'image/jpeg';
    // Image upload to AWS S3 storage.
    Storage.put(this.imgFile.name, this.imgFile.content, {
      progressCallback: (progress: any) => {
        console.log(`Uploaded: ${progress.loaded}/${progress.total}`);
      },
      contentType: contentType,
      ACL: 'public-read',
      visibility: 'public',
      level: 'public',
    }).then((result: any) => {
      this.img = S3_URL + replaceAll(result.key, ' ', '+');
      // GraphQL API mutation service.
      this.bannerService.createBanner(
        this.img,
        this.form.value.channel,
        this.form.value.trailer,
        this.backgroundColor,
        this.buttonColor,
        this.textColor,
      );
      // Re-enable the form.
      this.form.enable({
        onlySelf: true,
        emitEvent: true,
      });
      // Clean all form fields.
      this.formElement.nativeElement.reset();
    }).catch((err) => {
      console.log('error =>', err);
    });
  }

Any idea of why S3 is ignoring the public access I'm indicating and putting the files as private? Thanks in advance!

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

0

Check your bucket property setup; maybe it is configured to block public access no matter what’s your permission. Also, check your account setting that doesn’t block public access to S3 https://aws.amazon.com/s3/features/block-public-access/

over 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