Uploaded image for project: 'Opencast'
  1. MH-9579

Inconsistent behaviour of /ingest/addMediaPackage

    Details

    • Severity:
      Incorrectly Functioning With Workaround
    • Steps to reproduce:
      Hide
      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”.
      Show
      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”.
    • Tags (folksonomy):

      TestRail: Results

        Attachments

          Activity

            People

            • Assignee:
              lkiesow Lars Kiesow
              Reporter:
              lkiesow Lars Kiesow
            • Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                TestRail: Cases