Skip to content
Discussion options

You must be logged in to vote

You can pass files as an array to the Dropzone component:

<livewire:dropzone
        wire:model="banners"
        :files="[ ... ]"
        :rules="['image', 'mimes:png,jpeg', 'max:10420']"
        :multiple="true" />

Each file in the array should follow this structure:

[
    'tmpFilename'   => '...',  // Temporary file name
    'name'          => '...',  // Original file name
    'extension'     => '...',  // File extension (e.g., png, jpeg)
    'path'          => '...',  // File path
    'temporaryUrl'  => '...',  // Temporary URL for preview
    'size'          => '...',  // File size in bytes
]

Make sure each element in the array follows this format to avoid unexpected errors.

For more…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ujnana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants