Hi, I create my own react component to show media.
https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/media/
- I cannot save the collection in add comment.
Following the media node example, I think the collection could save the file name in the node.
When I save the comment this payload creates a comment.
{
"body": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "asdfasdfasdf"
}
]
},
{
"type": "mediaSingle",
"attrs": {
"layout": "align-start"
},
"content": [
{
"type": "media",
"attrs": {
"id": "real media id",
"collection": "20138",
"type": "file"
}
}
]
}
]
}
}
the comment list will return in comments
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"text": null,
"content": [
{
"type": "text",
"text": "asdfasdfasdf"
}
],
"marks": null,
"attrs": null
},
{
"type": "mediaSingle",
"text": null,
"content": [
{
"type": "media",
"attrs": {
"id": "real media id",
"type": "file",
"collection": ""
}
}
],
"marks": null,
"attrs": {
"layout": "align-start"
}
}
]
}
the collection should be 20138 but return “”.
I just want to save the attachment id in attribute, but it seems doesn’t wok.
- How to get media content by media id in the ADF format?
I cannot find any JIRA cloud api to get attachment by media ID.
Does any one can help me? Thank you.