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

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

Open
haakonvt opened this issue May 10, 2023 · 1 comment

Comments

@haakonvt
Copy link

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!

@koenvo
Copy link
Owner

koenvo commented May 10, 2023

Hi @haakonvt,

Thanks for your issue.

Please attach an example to reproduce it. Makes it way easier for me to debug.

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