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

208
Views
How to put a file in my data and posted with javascript

pleas I have my following code:

let data = {
    input: {
      amount: 100,
      identity_card: document.forms["form"]["file"].files[0],
    }
}

But it does not work. I would like my identity_card attribute to be a file. I tried every possible way, but without success. I even tried with the FormData but without success

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

To upload files, you need to use multipart/form-data encoding. Please read more about file upload here. You can however save your images as Object Urls and submit using application/json encoding

about 4 years ago · Juan Pablo Isaza Report
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!