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

pulp file content upload fails if file is smaller than one chunk #535

Closed
mdellweg opened this issue Jul 18, 2022 · 0 comments · Fixed by #536
Closed

pulp file content upload fails if file is smaller than one chunk #535

mdellweg opened this issue Jul 18, 2022 · 0 comments · Fixed by #536
Labels
bug Something isn't working (template-set)
Milestone

Comments

@mdellweg
Copy link
Member

Summary

SSIA

Steps to reproduce

pulp file content upload --relative-path "README.md" --file "README.md"

Expected behavior

upload the file using the multipart encoding

Stacktrace/Error log

$ pulp -vv file content upload --relative-path "README.md" --file "README.md" 
post http://pulp3-source-debian11/rerouted/djnd/api/v3/content/file/files/
  User-Agent: Pulp-CLI/0.15.0.dev
  Accept-Encoding: gzip, deflate
  Accept: application/json
  Connection: keep-alive
  Content-Length: 441
  Content-Type: application/x-www-form-urlencoded
  Authorization: Basic YWRtaW46cGFzc3dvcmQ=
'relative_path=README.md&file=%23+Pulp+command+line+interface%0A&file=%0A&file=This+is+a+command+line+interface+for+Pulp+3.%0A&file=%0A&file=This+software+is+in+beta+and+future+releases+may+include+backwards+incompatible+changes.%0A&file=%0A&file=Check+out+our+%5Bdocs%5D%28https%3A%2F%2Fdocs.pulpproject.org%2Fpulp_cli%2F%29+and+the+%5Bquickstart+guide%5D%28https%3A%2F%2Fdocs.pulpproject.org%2Fpulp_cli%2Fquickstart%2F%29+to+get+started.%0A'
Antwort: 400
Error: {"file":["The submitted data was not a file. Check the encoding type on the form."]}

Pulp and pulp-cli version info

0.15.0.dev0

Additonal context

One can circumvent the issue by specifying an absurd small batch size.

@mdellweg mdellweg added bug Something isn't working (template-set) Triage-Needed Needs to be reviewed at next pulp-cli mtg labels Jul 18, 2022
@mdellweg mdellweg added this to the 0.15.0 milestone Jul 19, 2022
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 19, 2022
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 19, 2022
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 19, 2022
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 19, 2022
@ggainey ggainey removed the Triage-Needed Needs to be reviewed at next pulp-cli mtg label Jul 19, 2022
gerrod3 pushed a commit that referenced this issue Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (template-set)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants