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

206
Vistas
How to convert an input image file to string in a form?

I don´t know how to code this input so that when an object is created through a form, the image property returns a string so that it can later be displayed in a card.

<input 
      classname = {style.imageInput}
      type = "file"
      name = "image
      alt = "newDoggie"
      accept = "image/*"
      multiple
/>

The object has this properties:

id: '',
name: ''.
breed_group: ''.
heightMin: '',
heightMax: '',
weightMin: '',
weightMax: '',
life_span: '',
image: '',
temperaments: []
                           

An example of how I am saving the other data:

<input
      classname = {style.nameInput}
      placeholder = "NAME"
      type = "text"
      value = {input.name}
      name = "name"
      onChange = {(e) => handleChange(e)}
      required
/>

<input
      className = {style.heightInput}
      required
      placeholder = "MINIMUM HEIGHT -cm- "
      type = "text"
      value = {input.heightMin}
      name = "heightMin"
      onChange = {(e) => handleChange(e)}
/>

function handleChange(e) {
    setInput({
        ...input,
        [e.target.name] : e.target.value
    });
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