laravel-filepond
laravel-filepond copied to clipboard
Allow to specify input name
Add input name filed with modifying the filepond ondata method. Here is the example
FilePond.create(document.querySelector('input.photo-file'), {
labelIdle: 'Drag & Drop Gambar Varietas atau <span class="filepond--label-action"> Browse </span>',
acceptedFileTypes: 'image/*',
server: {
url: "{{ route('filepond.chunk') }}",
process: {
url: '/process',
ondata: function (form) {
form.append('input_name', 'photo_file');
return form;
}
},
revert: '/process',
patch: "?patch=",
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
}
}
})
Refer to: https://pqina.nl/filepond/docs/api/server/#object-configuration
Solve issue #67