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

154
Visualizações
Is there any concept in angular to implement below requirement?

I have an input file upload type which is designed as below image.

Image1

When I upload the file the upload document label is getting overridden by fileName as shown in the below image.

Image2

What I want to do is when I upload an image, dynamically I want to create one more input file type and render on UI to upload a different file again when I click on 2nd input file which is created dynamically, and upload the file a 3rd input tag should be created when I click on 3rd and upload the 4th tag should be created and this goes on. On all tags, the upload documents label should be overridden by fileName once the file is uploaded.

This is in angular 8+. Any help would be appreciated. Note: Input File type multiple is not allowed. ALl the input types should be editable where users can re-upload files.

Below is the HTML code

    <div class="row" style="margin-bottom: 10px;">
      <input type="file" class="otherDocumentsUpload" (change)="onFileSelected($event)" #fileUpload>
      <button mat-mini-fab class="upload-btn" (click)="fileUpload.click()">
        <span>
          <img src="assets/image/upload-icon.png" width="15px" height="16px" style="margin-right: 5px;"></span>
        {{uploadedFile5 === '' ? 'Upload Document' : uploadedFile5}}</button>
      <div class="file-upload" style="padding-left: 10px;">
        {{fileName}}
      </div>
    </div>

CSS code

.otherDocumentsUpload{
  display: none;
}

.upload-btn{
  color: #999999;
  font-family: Muli;
  font-size: 16px;
  text-align: left;
  border: 1px dashed #b7b3b3;
  border-radius: 4px;
  height: 48px;
  background: #fff !important;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  text-align: center !important;
  margin-left: 13px;
  width: 30%;
}

.file-upload{
  width: 30%;
}

.labelUploadDocuments{
  color: #000000;
  font-family: Muli;
  font-size: 14px;
  line-height: 16px;
  text-align: left;
  font-weight: 700;
}

so simply consider as I've uploaded a file one more file upload option is rendered where I can upload a different file. I've uploaded into 2nd option one more file upload is rendered. and this goes on.

about 4 years ago · Juan Pablo Isaza
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