Web1.PostFile not working for multipart/form-data

IMG-20250508-WA0000

Why giving request without any data??
I seen with post text my api working good becouse i have just return all data of request but when i gave post file request it giving null request why????

first get it running in the foreground, does it work as you expect it to work?
after you got it running, then try to do it in the background

Taifun




I'm working on an MIT App Inventor project where I need to record audio and send it to my Laravel backend API.

My Laravel endpoint looks like this:POST https://backend.wimbledoninvestments.com/record-store
It expects a multipart/form-data request with the file under the field name "file".

Here’s what works when I test it in Postman:

  • Field name: file
  • File: uploaded from disk
  • Content-Type: multipart/form-data

But from MIT App Inventor, I’m struggling to send the audio file properly. When I test the upload, the Laravel log shows garbage data like:production.INFO: Incoming Request Data: {"�7U�\u001d�\u000b�<_�y'v�":null, ...}
It seems like the binary data is being sent as field names, not as the file under "file".

  • How can I correctly send a recorded audio file as multipart/form-data from MIT App Inventor?
  • How do I ensure the file is sent with the field name file?
  • Any working block examples would be super helpful!

Thanks in advance!

This post was flagged by the community and is temporarily hidden.

The web component is not able to do this
Try

Taifun

thanks..it is working good.