How to embed a file as base64 string in a POST multipart/form-data request?

Is it possible to send a POST request with the request body as multipart/form-data where we need to upload a file without getting it from an external source?
The idea is to embed the file content encoded in base 64 and to not use the ‘src’ parameter to get the file from the path, like the following:

“formdata”: [
“key”: “email”,
“type”: “file”,
“fileName”: “name.eml”,
“fileContents”: “UmVjZWl2ZWQ6IGZyb20gaXAtMTkyLTE2O…”

Is there any way to do something like this?