Skip to content

[python-upload-file-s3-multipart] impossible to make it work #110

@nicolasSagon

Description

@nicolasSagon

Hello, i have try to implement the code from this example.
I don't have the lib serverless, i have made a function by hand and call my handler on the configuration of the function.
When my function receive the mulitpart/body, i have no error while using the StreamingFormDataParser but every time when i save to a local file or upload it to a S3 i always have an invalid document.

I have taken the time to inspect the content of the body, and the binary data of my file is passed as str so encoded to UTF8 to my function but the binary contain invalid ASCII char so i loose some part of the data resulting in my corrupted file.

Am i doing something wrong ?
Thanks for you help !

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