sachatrauwaen / OpenContent

Structured Content editing for DNN (Dotnetnuke)
46 stars 25 forks source link

Multi-Upload does not create multiple items #160

Open Timo-Breumelhof opened 3 years ago

Timo-Breumelhof commented 3 years ago

I have a template with MultiUpload and the imagex field. When I upload multiple images, only one item gets created, although all images are uploaded.

Template:

Schema:


 "Images": {
      "type": "array",
      "title": "Extra Images",
      "items": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "title": "Title",
            "required": true
          },
          "Image": {
            "type": "string",
            "title": "Image"
          },
          "Text": {
            "type": "string",
            "title": "Image Text"
          }
        }
      }
    }

Options

 "Images": {
      "type": "multiupload",
      "items": {
        "fields": {
          "Title": {
            "type": "text",
            "helper": "Title for SEO and Accessibility"
          },
          "Image": {
            "type": "imagex",
            "uploadhidden": false,
            "uploadfolder": "/Artikelen/Images",
            "fileExtensions": "gif|jpg|jpeg|tiff|png",
            "fileMaxSize": 10485760,
            "showOverwrite": true,
            "overwrite": false,
            "showCropper": false
          },
          "Text": {
            "type": "ckeditor",
            "configset": "basic"
          }
        }
      }
    }

The annoying issue here is that because the title is required and it seems like Alpaca does create 4 items when I upload 4 images, but only shows one, you get a warning that not all fields have been entered when you try to save. But there's no way to reach them as only one is shown.

Timo-Breumelhof commented 3 years ago

When I switch the field to type: "image" it works as expected