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

230
Views
How to access json data in php from blob sent via javascript fetch

Need a little assistance in using php to access blob data sent from javascript post. Here is the method I used to attach blob to formdata -

var formData = new FormData();
formData.append('jsonData', 
                new Blob([JSON.stringify(
                    {"action":"readString", 
                    "details":{"string":"string1"}
                    })
                ],
                {type:'application/json'})
            );

Previously I only used $_POST method, but I am having no luck when sending file as blob.

Also, is it necessary to include "{type:'application/json'}" object. I saw other examples of sending blob via post and did not see this additional object included.

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!