-
Notifications
You must be signed in to change notification settings - Fork 282
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
Files param doesn't have to be a dictionary type #401
Comments
when you talk about new change is in original requests library? could you provide more references to the changelog or documentation and the version you noticed this? |
Uploading a list of files with the same key is supported by the Requests library. This allows the receiving server to accept a list of files for the same key, i.e. accepting an arbitrary number of files. Issue: MarketSquare#401
Uploading a list of files with the same key is supported by the Requests library. This allows the receiving server to accept a list of files for the same key, i.e. accepting any number of files. Issue: MarketSquare#401
Hi @lucagiove thanks for a follow-up, it was broken by changes in commit 4de7ccd: Thanks @vanhanit for having the PR ready, it works fine if that matters, maybe @lucagiove can give you a code review unless there are other proposals to have this fixed? |
Uploading a list of files with the same key is supported by the Requests library. This allows the receiving server to accept a list of files for the same key, i.e. accepting any number of files. Issue: MarketSquare#401
Uploading a list of files with the same key is supported by the Requests library. This allows the receiving server to accept a list of files for the same key, i.e. accepting any number of files. Issue: MarketSquare#401
Uploading a list of files with the same key is supported by the Requests library. This allows the receiving server to accept a list of files for the same key, i.e. accepting any number of files. Issue: #401
robotframework-requests/src/RequestsLibrary/RequestsKeywords.py
Line 52 in 233ff7c
It seems that a new change was introduced and now all the files used for POST have to be in the specific format.
However, this is not the case for all the scenarios. One can use Py requests to upload multiple files using list of tuples.
E. g.
multiple_files = [
('images', ('foo.png', open('foo.png', 'rb'), 'image/png')),
('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
This no longer works and would be great to be fixed to be in align with Py requests library.
This causes the 'list' object has no attribute 'values' error. The workaround is to use the dictionary structure, but problem is if you need multiple files uploaded with same 'file' tag. Dictionary has to have unique key, having 4 times 'file' as the key is not possible.
The text was updated successfully, but these errors were encountered: