Multi Upload
Adding multiple (file or image) items at once in Open Content
The Multi upload option van be used in combination with all file and image field types.
It allows you to upload multiple images or files at once and create items for this.
After that you can start editing the other fields of the generated items.
Using Multi upload in Open Content
Multi upload is an attribute that can be set for a array of items that contains a file or image type field.
With the "Multi upload" option, Open Content will show a mulit-upload button op top of the form which will generate an item for each uploaded file.
This makes adding multiple items quickly much easier.
{
"type": "object",
"properties": {
"ModuleTitle": {
"type": "string",
"title": "Module Title"
},
"Elements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string",
"title": "Title"
},
"Description": {
"type": "string",
"title": "Description"
},
"Image": {
"type": "string",
"title": "Image",
"uploadfolder" : "Images/Masonery"
}
}
}
}
}
}
{
"fields": {
"ModuleTitle": {
"type": "text"
},
"Elements": {
"type": "multiupload",
"items": {
"fields": {
"Title": {
"type": "text"
},
"Description": {
"type": "textarea"
},
"Image": {
"type": "image"
}
}
}
}
}
}
As you can see in the code there are two thing you need to do to activate Multi Upload.
A. You have to set the "type" of the set to "array"
B. In the options, you set the "type" to "multiupload".
This will change the upload button to a multi-upload button.
Updated less than a minute ago