Skip to content

Commit 4d7e86b

Browse files
authored
Update tip for repeatable components index in Upload documentation (#1323)
1 parent 3555a02 commit 4d7e86b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/developer-docs/latest/plugins/upload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ The corresponding code would be:
479479
Your entry data has to be contained in a `data` key and you need to `JSON.stringify` this object. The keys for files need to be prefixed with `files` (e.g. for a cover attribute: `files.cover`).
480480

481481
::: tip
482-
If you want to upload files for a component, you will have to specify the index of the item you want to add the file to: `files.my_component_name[the_index].attribute_name`
482+
If you want to upload files for a repeatable component, you will have to specify the zero-based index of the item you want to add the file to, using the following syntax: `files.my_component_name[the_index].attribute_name`. For instance, if you put 3 components and the file is for the second one, the index will be 1.
483483
:::
484484

485485
:::caution

0 commit comments

Comments
 (0)