pyodide-http icon indicating copy to clipboard operation
pyodide-http copied to clipboard

Uploading a file by passing a file handler yields `repr(fh)` instead of its contents

Open haakonvt opened this issue 1 year ago • 1 comments

I'm not very familiar with the requests (or pyodide-http) library, but could it happen that .read() method is not called?

I found this in https://requests.readthedocs.io/en/latest/_modules/requests/models/#PreparedRequest :

elif hasattr(fp, "read"):
    fdata = fp.read()

...or am I doing something wrong? 🤔

I can add an example to reproduce later if needed!

haakonvt avatar May 10 '23 07:05 haakonvt