-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
3
-
None
When making a request to create an upload, the size cannot be changed
To reproduce:
- Create an upload with the wrong size for the rpm
POST http://localhost:8000/api/content-sources/v1.0/repositories/uploads/
{
chunk_size: <chunk size>,
size: <wrong size>,
sha256: <rpm>
}
2. Recreate the upload with the correct size
POST http://localhost:8000/api/content-sources/v1.0/repositories/uploads/
{
chunk_size: <same chunk size>,
size: <correct size>,
sha256: <same rpm>
}
3. The response from the second request will appear to have updated the size
{ "upload_uuid": <same upload uuid from the first request, "size": <correct size> }
4. When uploading the chunks, the upload will ultimately fail. And the upload chunk response will return the original size.
{\"non_field_errors\":[\"End byte is greater than upload size.\"]}"}]}
we should consider the size when making an upload entry in the upload table, and create a new entry if the size changes