I’m developing a gateway in Scala with Finagle libraries. This gateway sits between mobile apps and my client’s existing web services.
The web service description (hosted on .Net) for a file upload method specifies the expected file content as follows:
<FileContents>base64Binary</FileContents>
On the mobile side, the apps are uploading content to the gateway using PhoneGap’s FileTransfer object. This means that the image gets to the gateway as a base64-encoded string.
How do I convert from the base64-encoded string to a base64Binary using Scala?
Found the answer through a related question I had.
I suppose this question can be safely deleted, but may help others get to the right answer: