Skip to content

Sending multipart as describe in the README doesn't seem to work. #6

@naturalethic

Description

@naturalethic

It appears this might not have been implemented, or am I doing it wrong?

token.post('documents/%s' % id, documentType = 'other', file = ('rollbar.png', open('rollbar.png', 'rb'), 'image/png'))

Results in:

TypeError: <open file 'rollbar.png', mode 'rb' at 0x10c6ea4b0> is not JSON serializable

And

token.post('documents/%s' % id, documentType = 'other', file = ('rollbar.png', open('rollbar.png', 'rb').read(), 'image/png'))

Results in:

UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 0: invalid start byte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions