-
How to view existing image or file from server ? |
Beta Was this translation helpful? Give feedback.
Answered by
dasundev
Mar 16, 2025
Replies: 1 comment
-
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 details, refer to the official implementation: https://github.com/dasundev/livewire-dropzone/blob/main/src/Http/Livewire/Dropzone.php |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ujnana
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can pass files as an array to the Dropzone component:
Each file in the array should follow this structure:
Make sure each element in the array follows this format to avoid unexpected errors.
For more…