Hi Elice,
Base64 encoded data can get really large. One option is to do the base64 conversion in the backend using the CommunityCommons Java action.
However, what is your use case to need the contents in base64 encoded format? Quite often you can pass the URI to another library. Only problem is that Mendix stores the files using an internal name, without extension.
I had similar problems when getting my NativeFileDocuments module to work. In that module, I copy the Mendix file to a temporary file with the right name and pass that URI to the native library.
With regards,
Marcel