The media node represents a single file or link stored in media services. Alternatively, it can also represent a link to an external media resource.1
1 2 3 4 5 6 7 8 9Media.fileMedia( "6e7c7f2c-dd7a-499c-bceb-6f32bfbf30b5", "my project files" ) .size(200, 183) .linkMark("https://developer.atlassian.com/") .border(2, "#091e4224") .mark(inlineComment("c4cbe18e-9902-4734-bf9b-1426a81ef785"));
Or equivalently:
1 2 3 4 5 6 7 8 9Media.media() .file() .id("6e7c7f2c-dd7a-499c-bceb-6f32bfbf30b5") .collection("my project files") .size(200, 183) .linkMark("https://developer.atlassian.com/") .border(2, "#091e4224") .mark(inlineComment("c4cbe18e-9902-4734-bf9b-1426a81ef785"));
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33{ "type": "media", "attrs": { "id": "6e7c7f2c-dd7a-499c-bceb-6f32bfbf30b5", "collection": "my project files", "type": "file", "width": 200, "height": 183 }, "marks": [ { "type": "link", "attrs": { "href": "https://developer.atlassian.com/" } }, { "type": "border", "attrs": { "color": "#091e4224", "size": 2 } }, { "type": "annotation", "attrs": { "id": "c4cbe18e-9902-4734-bf9b-1426a81ef785", "annotationType": "inlineComment" } } ] }
Note: The image border is not shown in this example.
| Confluence | Jira |
|---|---|
| ✅ | ✅ |
type attribute set to file or linkmediafile or link)
type attribute set to external5medialink media no longer functions in the editor code base, so clients are unlikely to encounter it in the wild and should not use it in new ADF.↩︎link media no longer functions in the editor code base, so clients are unlikely to encounter it in the wild and should not use it in new ADF.↩︎"", which this library uses by default.↩︎localId, when present, will typically be a random UUID. This is not enforced by the schema.↩︎media with a type of external, even internally at Atlassian. This documentation will be improved once that information is available. Your humble documentation author has only seen it used in cases where there was a problem accessing the underlying image, resulting in problems uploading its contents to the Media API.↩︎media with a type of external, even internally at Atlassian. This documentation will be improved once that information is available. Your humble documentation author has only seen it used in cases where there was a problem accessing the underlying image, resulting in problems uploading its contents to the Media API.↩︎localId, when present, will typically be a random UUID. This is not enforced by the schema.↩︎Rate this page: