-
Notifications
You must be signed in to change notification settings - Fork 42
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
CLI does not send the file name in the form data on file uploads. #842
Comments
What is the actual bug here? What does not work when doing it this way? |
Sorry, wrong button. |
Endpoints that parse the filename of the uploaded file like we do in ansible: https://github.com/pulp/pulp_ansible/blob/main/pulp_ansible/app/serializers.py#L483-L485 |
And how come we didn't see this earlier? |
We haven't seen this earlier because I set up ansible collection upload to use the endpoint with the least validation, which I happen to deprecate in pulp_ansible 0.16 (pulp/pulp_ansible#1176). I'm going to submit a PR to switch collection uploads to use the pulp v3 api instead. |
Summary
When serializing the request body for an upload, openapi.py does not specify the file name in the upload tuple
(filename, file_data, content_type)
Steps to reproduce
Perform a file upload with
-vvv
and look at the filename for the file field, it'll probably be 'file' (the name of the upload file used by the api)The text was updated successfully, but these errors were encountered: