Actions
Issue #4760
closedDiscrepancy in the docs about HTTP verb used to start a chuncked upload
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation
Sprint:
Sprint 52
Quarter:
Description
Per REST API docs:
POST is used to create an upload
post /pulp/api/v3/uploads/
See: https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/uploads_create
Per work flows documentation:
For large file uploads, Pulp supports uploading files in chunks. To begin uploading a file in chunks, an initial PUT request must be sent to the /pulp/api/v3/uploads endpoint:
http --form PUT :24817/pulp/api/v3/uploads/ file@./chunkaa 'Content-Range:bytes 0-6291455/32095676'
See: https://docs.pulpproject.org/en/3.0/nightly/workflows/upload-publish.html
Actions
Problem: OpenAPI schema for Uploads is wrong
Solution: add multiple serializers for Uploads
This patch introduces a ViewSet that uses SwaggerAutoSchema to describe the REST API provided by drf_chunked_uploads. This also required adding some new serializers. Since the post and put methods provided by drf_chunked_uploads are used to perform multiple actions, a custom Router was needed to route all the calls to the correct methods.
fixes: #4760 https://pulp.plan.io/issues/4760