You could create a base64 string of that file and encrypt it. Then on the Mendix side decrypt it again and turn it back into a file.
The typical solution is to only expose your endpoint over HTTPS, that takes care of encryption over the network. Nowadays, this is the default method of securing communication.
Alternatively, Ronald's suggestion is right. First, you Base64 encode your file to a string. Then, you encrypt the string using the Encryption module from the AppStore.