Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!