Tim Dowling PRO said over 3 years ago on StimulusJS, Active Storage and DropzoneJS :
I do have a question, if i wanted to place this on an existing recordĀ  and remotely update on the record how would I go about handling the array of multiple files/images? I've tacked on the below to the "addedfile" methodĀ  but getting a 'unpermitted param evidences' error even though I have evidences: [] permitted in params. I think it's how i'm formatting the params in the formData.append - any clues? (I've got this working with one file)

let formData = new FormData()
            formData.append("event[evidences]", this.hiddenInput.value);
            Rails.ajax({
              url: this.data.get("update-url"),
              type: "PATCH",
              data: formData
              
            });