sveltia / sveltia-cms

Alternative to Netlify/Decap CMS. Fast, lightweight, Git-based headless CMS. Modern UX, first-class i18n support, open source & free. Made with Svelte.
MIT License
750 stars 34 forks source link

Support multiple image selections with default media library #10

Open frankbits opened 1 year ago

frankbits commented 1 year ago
- { name: "img", label: "Image", widget: image, allow_multiple: true }

The allow_multiple-option of the image-widget seems to not be supported. Or just the media-library does not support multiple-selection, which would make the option in line with the decap-cms-Doc

allow_multiple: (default: true) when set to false, multiple selection will be disabled even if the media library extension supports it

kyoshino commented 1 year ago

The allow_multiple option is only for external media libraries like Cloudinary and Uploadcare, which are not supported yet in Sveltia CMS. Well, I know there is an issue with Netlify/Decap CMS for supporting the option with the default media library. I’ll take care of it after adding support for external libraries and understanding the behaviour.

kyoshino commented 1 year ago

Let me clarify: it seems the allow_multiple option is for disabling multiple selections in an external media library. As the Decap CMS doc suggests, if you want to enable multiple selections in a media library, the configuration would look like this:

  - label: "Featured Image"
    name: "thumbnail"
    widget: "image"
    choose_url: true
    default: "/uploads/chocolate-dogecoin.jpg"
    media_library:
      config:
        multiple: true

Either way, this is not yet supported by the default media library both in Decap CMS and Sveltia CMS.