Thanks to visit codestin.com
Credit goes to github.com

Skip to content

multiple file upload inertia-rails with vue #229

@t3ndai

Description

@t3ndai

Single file uploads are working fine.

But multiple file uploads are not.

      <label for="doc">Docs</label>
      <input type="file" :multiple="true" name="doc[]" id="doc" @input="form.docs = $event.target.files"
        class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" />
      <div v-if="form.errors.docs" :class="$style.error">
        {{ form.errors.docs.join(', ') }}
      </div>
    </div>

then my accepted params

      params.require(:patient_procedure_result).permit(:notes, :lab_branch_user_id, :patient_procedure_id, images: [])
    end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions