Hello, I'm trying to import using the import/export functionality some slices containing media items in the "repeat" part.
In order to have a model, I started to export our data and then I created a test json.
The exported json :
{
"body": [
{
"key": "segments$4803dc25-4cfb-4ebc-aece-2210fe5b7a1e",
"value": {
"repeat": [
{
"reference": {
"id": "YCz2CBEAACUALtz4",
"url": "https://prismic-io.s3.amazonaws.com/yousigncom/b7f32043-3046-4228-a465-21e95c94a849_legal-yellow%402x.png",
"name": "legal-yellow@2x.png",
"kind": "image",
"date": "02/17/21 10:43",
"size": "592086",
"width": "682",
"height": "680",
"wioUrl": "wio://medias/YCz2CBEAACUALtz4"
}
},
{
"reference": {
"id": "YCVGrxEAACgADUzt",
"url": "https://prismic-io.s3.amazonaws.com/yousigncom/8a549fa2-b143-4927-9b60-4114c0472a95_marker-pink%402x.png",
"name": "marker-pink@2x.png",
"kind": "image",
"date": "10/13/20 08:27",
"size": "495853",
"width": "680",
"height": "680",
"wioUrl": "wio://medias/YCVGrxEAACgADUzt"
}
}
],
"non-repeat": { "segment_label": "Segment 1" }
}
},
{
"key": "segments$e7199340-a06f-4cc6-904f-02fc87dd6023",
"value": {
"repeat": [
{
"reference": {
"id": "YCVGThEAACgADUxY",
"url": "https://prismic-io.s3.amazonaws.com/yousigncom/03471b1e-6b25-4f29-ba0c-67863cc31970_storage-green%402x.png",
"name": "storage-green@2x.png",
"kind": "image",
"date": "10/13/20 08:27",
"size": "511501",
"width": "680",
"height": "680",
"wioUrl": "wio://medias/YCVGThEAACgADUxY"
}
},
{
"reference": {
"id": "YCz2CBEAACcALtz3",
"url": "https://prismic-io.s3.amazonaws.com/yousigncom/33ef2984-f979-4974-a8f3-d971a3c64440_swipe-yellow%402x.png",
"name": "swipe-yellow@2x.png",
"kind": "image",
"date": "02/17/21 10:47",
"size": "545624",
"width": "682",
"height": "680",
"wioUrl": "wio://medias/YCz2CBEAACcALtz3"
}
}
],
"non-repeat": { "segment_label": "Segment 2" }
}
}
],
"type": "segments-references",
"tags": [],
"lang": "fr-fr",
"grouplang": "YDTFeBAAACIAynmz"
}
The json I created to test the import :
{
"body": [
{
"key": "segments",
"value": {
"repeat": [
{
"reference": {
"origin": {
"url": "zendesk.jpg"
}
}
},
{
"reference": {
"origin": {
"url": "square.jpg"
}
}
}
],
"non-repeat": { "segment_label": "Segment 1" }
}
},
{
"key": "segments",
"value": {
"repeat": [
{
"reference": {
"origin": {
"url": "nike.png"
}
}
},
{
"reference": {
"origin": {
"url": "instacart_360.jpg"
}
}
}
],
"non-repeat": { "segment_label": "Segment 2" }
}
}
],
"type": "segments-references",
"lang": "fr-fr"
}
The import feature tell me that the "id", "size", "width" etc must be defined. But my understanding of the documentation How to Import Content - Prismic is that we can used an "origin" object to automatically import media items based on a web or locale link.
I would like to understand why I can't do like in the documentation here and if there is a solution.
Thanks,
Arnaud