Project

Profile

Help

Issue #3422

closed

It's possible to create a file content unit with multiple artifacts

Added by daviddavis over 6 years ago. Updated over 5 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

I'm pretty sure I should not be able to do this?

$ echo 'foo' > foo.tar.gz
$ echo 'bar' > bar.tar.gz
$ http --form POST http://localhost:8000/api/v3/artifacts/ file@./foo.tar.gz
...
"_href": "http://localhost:8000/api/v3/artifacts/299990e7-dbf8-4a5d-8460-050d81e70134/"
...
$ http --form POST http://localhost:8000/api/v3/artifacts/ file@./bar.tar.gz
...
"_href": "http://localhost:8000/api/v3/artifacts/ea78f8ab-d665-47e5-9fdc-097ca302ee4a/"
...
$ cat | http POST :8000/api/v3/content/file/
{
  "digest": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
  "path": "foo.tar.gz",
  "artifacts": {"foo.tar.gz":"http://localhost:8000/api/v3/artifacts/299990e7-dbf8-4a5d-8460-050d81e70134/", "bar.tar.gz":"http://localhost:8000/api/v3/artifacts/ea78f8ab-d665-47e5-9fdc-097ca302ee4a/"}
}
^D

{
    "_href": "http://localhost:8000/api/v3/content/file/a706ed7e-e814-4c92-b57b-f76c9166c54d/",
    "artifacts": {
        "bar.tar.gz": "http://localhost:8000/api/v3/artifacts/ea78f8ab-d665-47e5-9fdc-097ca302ee4a/",
        "foo.tar.gz": "http://localhost:8000/api/v3/artifacts/299990e7-dbf8-4a5d-8460-050d81e70134/"
    },
    "digest": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
    "notes": {},
    "path": "foo.tar.gz",
    "type": "file"
}

Related issues

Is duplicate of File Support - Task #3428: Update content unit creation so it takes only a relative_path and artifact hrefCLOSED - CURRENTRELEASEdaviddavis

Actions

Also available in: Atom PDF