How do i upload a file inside a component using postman?

i have a content type with this structure

"data": [
        {
            "id": 1,
            "attributes": {
                "name": "Test",
                "createdAt": "2022-04-27T04:25:51.809Z",
                "updatedAt": "2022-04-27T04:25:52.938Z",
                "publishedAt": "2022-04-27T04:25:52.932Z",
                "file": [
                    {
                        "id": 1,
                        "title": "Test",
                        "materials": [
                            {
                                "id": 1,
                                "materi": {
                                    "data": [
                                        {
                                            "id": 1,
                                            "attributes": {
                                                "name": "159_Article_Text_549_1_10_20211230_4734b302e0.pdf",
                                                "alternativeText": "159_Article_Text_549_1_10_20211230_4734b302e0.pdf",
                                                "caption": "159_Article_Text_549_1_10_20211230_4734b302e0.pdf",
                                                "width": null,
                                                "height": null,
                                                "formats": null,
                                                "hash": "159_Article_Text_549_1_10_20211230_4734b302e0_0ac45ee040",
                                                "ext": ".pdf",
                                                "mime": "application/pdf",
                                                "size": 961.48,
                                                "url": "https://res.cloudinary.com/soa/image/upload/v1651033546/159_Article_Text_549_1_10_20211230_4734b302e0_0ac45ee040.pdf",
                                                "previewUrl": null,
                                                "provider": null,
                                                "provider_metadata": {
                                                    "public_id": "159_Article_Text_549_1_10_20211230_4734b302e0_0ac45ee040",
                                                    "resource_type": "image"
                                                },
                                                "createdAt": "2022-04-27T04:25:46.526Z",
                                                "updatedAt": "2022-04-27T04:25:46.526Z"
                                            }
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                ]
            }
        }
  ]

i’ve figured out how to insert the first component but im struggling about uploading file inside the component


the key “data” works fine but the other one didnt work

1 Like