Skip to content
Advertisement

Filepond input field not attached with formdata while sending

How do I upload a FilePond file field to the server along with other form elements. For example i have a form element that contains input fields, a select field, a textarea and a file input field which is connected to the Filepond plugin.

JavaScript

But whenever i try to upload the form the file field doesn’t upload with it to the server, please help me with this. How do i bind the FilePond input field to my formdata element?

This is my jQuery upload code:

JavaScript

Advertisement

Answer

You need to append FilePond files manually to the FormData object. FilePond objects has a file property which is the original file blob object. You can go like this:

JavaScript
JavaScript

With this, you’ll get the files as if they where sent by html form.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement