livewire-dropzone
livewire-dropzone copied to clipboard
use dropzone events
How can I use Dropzone events?
Example:
this.on('addedfile', function(file) {
console.log('Dosya eklendi: ', file);
});
this.on('success', function(file, response) {
console.log('Yükleme başarılı: ', response);
});
this.on('error', function(file, errorMessage) {
console.log('Hata oluştu: ', errorMessage);
});
this.on('sending', function(file, xhr, formData) {
// FormData'ya ek veri ekleme
formData.append('extraData', 'extraValue');
});
this.on('complete', () => {
console.log('Complete: ', errorMessage);
});