Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple image upload when using cloudinary asset as child in separate object #39

Open
henninghaakonsen opened this issue May 9, 2023 · 3 comments
Labels

Comments

@henninghaakonsen
Copy link

Is it possible to add support for multiple select with nested objects? Let me show you our use-case.

We have a field defined like this:

    defineField({
      name: 'imageGallery',
      type: 'array',
      title: 'Image gallery',
      of: [{
        name: 'imageWithDescription',
        fields: [cloudinaryAsset, textField]
      }],
    }),

The plugin has support for multiple select when the cloudinary asset is a direct child of the of[] list. However, when it is nested in a new object this is not possible.

@henninghaakonsen
Copy link
Author

Would it be possible to change this logic to support nested arrays for example?

const cloudinaryType = props.schemaType.of.find(

@evenwestvang
Copy link
Member

evenwestvang commented May 10, 2023

The reasoning here is that this follows the same logic as the studio does for drag and drop. It works for image arrays, but not for other patterns (you might also want to deeply nest the image or have multiple types for the user to select between).

When we extend the mapping function for the studio generally we should think about extending the API for asset sources as well. It's a great suggestion so will leave this open.

@henninghaakonsen
Copy link
Author

Anything new on this issues @evenwestvang?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants