Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mistake on python example of create_custom_creative #371

Open
schunlee opened this issue Feb 11, 2019 · 0 comments
Open

mistake on python example of create_custom_creative #371

schunlee opened this issue Feb 11, 2019 · 0 comments
Assignees

Comments

@schunlee
Copy link

schunlee commented Feb 11, 2019

@grivescorbett
according to the api document, the type of assetByteArray attribute should be base64Binary, but the example set the content of image data directly, as below

   `image_data = open(os.path.join(os.path.split(__file__)[0], '..', '..', 'data', medium_rectangle.jpg'), 'r').read()

     ... ...

     'asset': {
                   'assetByteArray': image_data,
                   'fileName': 'image%s.jpg' % uuid.uuid4()
                   }
     ` 

the correct one should be:

     ` 'asset': {
                   'assetByteArray': base64.b64encode(image_data),
                   'fileName': 'image%s.jpg' % uuid.uuid4()
                   }
     `
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants