« Previous | Next » 

Revision 50251ae5

Parent d65d2d8c
Child cf77dc85

Added by bmbouter about 1 year ago

Make an Artifact from a PulpTemporaryUploadedFile

Adds the Artifact.create_and_validate staticmethod that creates an
in-memory, unsaved Artifact from a PulpTemporaryUploadedFile. Uploaded
files to Pulp show up with that type so that is convenient for plugin
writers. Also as the file is received by Django it auto-computes all of
the digest types.

This PR also moves SizeValidationError and DigestValidation error to
pulpcore.exceptions instead of living in pulpcore.plugin.downloads.

The ArtifactSerializer is also exposed via the plugin API with this
change also.
closes #4072