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

172
Views
Empty file upload after wrapping in a FormData

There are many Q&As on how to append the uploaded files to a FormData before submitting but none is about what if the POST/PUT request payload has to be a nested object with the uploaded files as one part of it.

Here is my payload format:

{
operator: // some String
documentTitle: // some String
time: // some Number
date: // some Date
sections: [
    {
        section_id: 0,
        sortOrder: 0,
        title: "",
        subsections: [
            {
                subsection_id: 0,
                files: []
            },
            {
                subsection_id: 1,
                files: []
            },
        ]
    },
    {
        section_id: 1,
        sortOrder: 1,
        title: "",
        subsections: [
            {
                subsection_id: 0,
                files: []
            },
            {
                subsection_id: 1,
                files: []
            },
        ]
    },
];

}

The files within the subsections should be filled with uploaded files and I still get empty files in my request payload even though I appended them to a FormData

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!