What data type works with jira api when working with gifs

Hello,

I am trying to figure out how i can convert a gif object into a type that works with jira like

const body = {
        "body": {
            "type": "doc",
            "version": 1,
            "content": [
                {
                    "type": "paragraph",
                    "content": [
                        {
                            "text": message,
                            "type": "text"
                        }
                    ]
                }
            ]
        }};

works for strings.

Any help would be really really appreciated.

best regards

@Bennet,

I think the short answers is to use the mediaSingle node.

The longer answer is the JSON you provided is known as Atlassian Document Format (ADF). From reading the docs, I’m not sure you could know that mediaSingle is how you present a GIF. The only way I have been able to work out how ADF works is to put what I want into the UI, then make an API request to see what the product did. When I added a picture to a Jira issue, here’s what I get as the node in ADF:

{
    "type": "mediaSingle",
    "attrs": {
    "layout": "align-start"
    },
    "content": [
      {
        "type": "media",
        "attrs": {
        "id": "5be450d6-f635-45f2-905b-714d71765c6a",
        "type": "file",
        "collection": "jira-10950-field-description",
        "occurrenceKey": "ab2ef21e-ae52-424f-a166-77669bfa14db",
        "width": 640,
        "height": 360
        }
      }
    ]
}