Here is my request:

When I try to upload a file it works just file.
Code generation part is compleate nonsence:

The file should be read into memory and should not be part of the payload.
Here is documentation form python: https://2.python-requests.org//en/latest/user/quickstart/#post-a-multipart-encoded-file