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

220
Visualizações
How can I change the name of the file that will download?

I have a link

<a href="/media/maca.pdf" download=""><img src="/static/images/download.svg" alt=""></a>

When I click download it starts downloading with the name maca.pdf. But I want to change that.

Can I achieve that?

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

0

You just simply need to have that name in the download="". So if you wanted to name the file myFile.pdf then you would do

<a href="/media/maca.pdf" download="myFile"><img src="/static/images/download.svg" alt=""></a>

Now when you click download the file should be called myFile.pdf

So after looking around it seems it is because your file is coming from a different location. Check out this link Download attribute with a file name not working? and this one Create a Downloadable Link using HTML5 Download Attribute

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