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

475
Vistas
Convert axios response to Blob url image to display/download it in website

I'm using the Egnyte API

I don't understand how the response object works, I tried to convert the data to Blob object and URL.createObjectURL but this doesn't work for me. I don't know if I can display this images to my website.

DOCS Egnyte API: LIST FILE OR FOLDER

This problem also happens to me when I want to download the image, because the api response returns plain encrypted text and I don't know how I can convert it into an object to download it with javascript/html

DOCS Egnyte API: DOWNLOAD FILE

Axios get images from Egnyte API

const getImages = () => {
    axios.get(`${API}/${params.id}/images/`, config).then(res => {
        setImagesList(res.data.files)
    }).catch((error) => {
        console.log(error)
    })
}

The response looks like this:

enter image description here

Convert item to Blob object and URL.createObjectURL

const displayImg = (list_images) => {
    return list_images.map(img => {
        const url = URL.createObjectURL(new Blob([img]))
        return (
            <div className='div_img' key={img.name}>
                <img src={url} />
            </div>
        )
    })
}

The URL object looks like this:

enter image description here

But the website looks:

enter image description here

Response from API DOWNLOAD FILE:

enter image description here

I would be very grateful if someone could explain to me how I can convert the API response into an image object to be able to show it and download it (and files to download).

Thank you very much!

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