2

If I have an input field with the name attribute already specified, like this:

<input type="file" name="profilepic">

And then I enhanced the file input above with FilePond below:

const inputElement = document.querySelector('input[type="file"]');
const pond = FilePond.create({
    name: 'filepond',
    server: {
        process: '/api/images/process'
    }
});

When I drop an image into FilePond and it uploads the image using server processing, the name of the file parameter is still "profilepic" and not "filepond". It appears when a file input element already has a name attribute, FilePond doesn't override it. Is this the correct behavior? I would like to override the name attribute when the image is submitted via server processing.

Ben Wong
  • 31
  • 4
  • 1
    Not related and maybe it's an error in the code snippet but you're not passing the `inputElement` to the `FilePond.create` method. – Rik Aug 09 '19 at 06:20

0 Answers0