2amigos / yii2-file-upload-widget

BlueImp File Upload Widget for Yii2
Other
251 stars 140 forks source link

Uploading silently #102

Closed spiro-stathakis closed 7 years ago

spiro-stathakis commented 7 years ago

I would like to remove the feedback from the upload widget and instead update a gridview which should show the newly uploaded files. Is there a way to do that with the Javascript callbacks ?

Thanks

tonydspaniard commented 7 years ago

Yes, use FileUpload instead of FileUploadUI and then use the events to write your logic to update the grid:


'clientEvents' => [
        'fileuploaddone' => 'function(e, data) {
                                console.log(e);
                                console.log(data);
                            }',
        'fileuploadfail' => 'function(e, data) {
                                console.log(e);
                                console.log(data);
                            }',
    ],