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

247
Vistas
I have used <iFrame> tag in my react app but it will open the same file even the file url is different, but if I used <a> tag it open perfectly

item.image URL is coming form the API but when I try to map in <a> tag it will work fine which is for the download icon but for the view icon it will open the same file. enter image description here

data.map(item => {
 return <>
     <Modal open={open} onClose={onCloseModal} center>
       <div className="modalContent">
           <iframe src={item?.image}>
           </iframe>      
       </div>
    </Modal>

 <a href={item?.image} target="_blank" download >
   <span className="IconBoc">
        <AiOutlineDownload />
    </span>
 </a>
</>
})

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You should be using <img> instead of <iframe>.

iframes are to embed other websites into your website.

For media there already exist tags like <img> or <video>.

Try:

data.map(item => {
 return <>
     <Modal open={open} onClose={onCloseModal} center>
       <div className="modalContent">
           <img src={item?.image} />
       </div>
    </Modal>

 <a href={item?.image} target="_blank" download >
   <span className="IconBoc">
        <AiOutlineDownload />
    </span>
 </a>
</>
})
about 4 years ago · Juan Pablo Isaza Denunciar
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