-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
request.files in addition to request.data #1651
Comments
So, what you need is an |
I created an PR that adds that parameter however I have not implemented the usage of it fully yet until I find out more on how requests works on it. |
I have void the github repo for the requests package I am looking into how they implemented their |
Ok, @iksteen I am working on it to where this would work for you (or at least something of the similar): files = {'imagefile': open(fname, 'rb')}
response = yield from s.request('post', url, files=files) |
i do not think maybe something like |
IIRC we had |
I agree, we need to think about this api carefully. I envision some |
better name is |
It seems the only way to add files to a request with aiohttp is by referencing them in the data parameter. However this becomes problematic when you have an API that expects to see something in 'files', not 'data.
For example, this works (using requests):
However this doesnt:
The text was updated successfully, but these errors were encountered: