Support for both text and base64 upload.