How to upload multiple files with smart actions?

Hello there,

I was wondering if there is a way to configure a smart action, allowing us to upload multiple file at a time.
We have this already in Forest docs, which allows us to perform a single file upload:

{
	field: 'file',
	type: 'File',
	isRequired: true
}

Would be nice to have similar template but for several files:

{
  field: 'files',
  type: 'Files'
}

Thanks for the feedback,

Julien

Hi @JuP :wave:, welcome to our community!

You can upload multiple files on a smart action form by defining your field as an array of strings + use the file picker widget. See ex below:

  actions: [{
    name: 'Upload files',
    fields: [{
      field: 'files',
      type: ['String'],
      widget: 'file picker'
    }]
  }],

This way, the end-user can upload as many files as they want!

2 Likes

Works perfectly thanks ! :pray:

1 Like