Inconsistent behaviour of /ingest/addMediaPackage

Steps to reproduce

Ingest a new recording using:
curl --digest -u digestuser:digestpasswd -H "X-Requested-Auth: Digest" 'http://localhost:8080/ingest/addMediaPackage/<WorkFlowId>' -F 'flavor=presentation/source' -F 'title=testingestviacurl7' -F "BODY=@test.mkv"
This will work.

Try to ingest another one using the same fields, but change the order:
curl --digest -u digestuser:digestpasswd -H "X-Requested-Auth: Digest" 'http://localhost:8080/ingest/addMediaPackage/<WorkFlowId>' -F "BODY=@test.mkv" -F 'flavor=presentation/source' -F 'title=testingestviacurl9'
This will fail with "org.opencastproject.workflow.api.WorkflowOperationException: Media package does not meet criteria for publication". The reason seems to be that the file will be uploaded but won't be saved and added to the mediapackage.

Possible solutions:

  • Change the docs, make clear that the BODY fields has to be the last one and let the ingest fail otherwise.

  • Make the order irrelevant.

Additional note: The documentation states that there are “Required (form) params“ and a “Body (upload) param”. This is really confusing as the “Body (upload) param” is also a form parameter with the name “BODY”.

Status

Assignee

Lars Kiesow

Reporter

Lars Kiesow

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

Components

Fix versions

Affects versions

Priority

Blocker
Configure