Upload base64-encoded file attachments to a rails rest service