An option would be to convert your file to a base64 String and use this string as attribute of your rest body. There is a java action in the community commons to decode/encode files to and from base64.
Please be aware of this discussion: https://forum.mendix.com/link/questions/100871
Not all characters in base64 are supported in json.