jquery-filepond icon indicating copy to clipboard operation
jquery-filepond copied to clipboard

addFile() method not working

Open Sudeep658 opened this issue 5 years ago • 4 comments

Hi,

I am trying to use the addFile method to add image dynamically using jquery. I am getting addFile is not function error. How can i solve this?

Thanks in advance

Sudeep658 avatar Feb 14 '19 07:02 Sudeep658

Please see docs: https://pqina.nl/filepond/docs/patterns/frameworks/jquery/

$('.my-pond').filepond('addFile', 'my-file.jpeg').then(function(file){
    console.log('file added', file);
});

rikschennink avatar Feb 14 '19 09:02 rikschennink

What should i pass in the place of index.html?

Sudeep658 avatar Feb 14 '19 11:02 Sudeep658

The file you want to add. Either a File Object, URL, or dataURI.

rikschennink avatar Feb 14 '19 11:02 rikschennink

I've renamed the file in the example snippet

rikschennink avatar Feb 14 '19 11:02 rikschennink