Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

91
Vistas
Download firebasecloud storage file using anchor tag

I am working on a chat application using flask-socketIO. I am allowing user to send files which I store in firebase using the pyrebase4 module.

I am successfull in saving file to firebase and displaying according to the type of file.

When the file is not audio,video,image , I make a <a> tag with download attribute and pass the firebase file link.

I want the file to be downloaded on click on the link. But rather downloading it takes me to the file.

I have searched various questions stating how to make a downloadable link. but none of them is working and it still takes me to the file.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
<a href="https://firebasestorage.googleapis.com/v0/b/flask-chat-9e187.appspot.com/o/e7a74b994ac84bebf46748a3e144d5charchitchat.js?alt=media&token=d46645d7-39e3-43f1-bcf0-9b4931c7c111" download>download</a>
  
</body>
</html>

I tried making a get request to the file and getting it's body but it gives the following error

No 'Access-Control-Allow-Origin' header is present on the requested resource

I have tried no-cors but it returns opague response without body.

My main purpose is to download the js file on this link I want to know how I can make the link downloadable so that user can download the file on click.

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda