I think adding something like this to the list of args would make sense:

....
payload_content_type = 'application/octet-stream', 
payload_content_encoding = 'base64',
....