Multipart form data in custom apps

I want to either recreate this kind of form as mappable field OR recreate the functionality inside the request body of my module. Can someone help me?
I need this for a file upload into my API I’m trying to connect to. It doesn’t accept anything else than multipart form data.