pqina / jquery-filepond

🔌 A handy FilePond wrapper for jQuery
https://pqina.nl/filepond
MIT License
239 stars 43 forks source link

addFile() method not working #8

Open Sudeep658 opened 5 years ago

Sudeep658 commented 5 years ago

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

rikschennink commented 5 years ago

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);
});
Sudeep658 commented 5 years ago

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

rikschennink commented 5 years ago

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

rikschennink commented 5 years ago

I've renamed the file in the example snippet