I am searching for a way to uploading multiple images to sanity.io. Only thing that I found is this issue.
But maybe there is another way. Some npm-plugin or node.js app approach.
I'll be grateful for the help.
Sanity Client requires the JavaScript runtime to have a global ES6-compliant Promise available. If your runtime environment doesn't provide a spec compliant Promise implementation, we recommend using native-promise-only, es6-promise or another spec-compliant implementation.
I found the answer in sanity.io slack. This is it.
For multiple images upload you have to use array of images instead of field with 'image' type
{
name: 'imagesGallery',
title: 'Images gallery',
type: 'array',
of: [{ type: 'image' }]
}
This is simple and elegant way to solve my problem. Excellent!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With