pqina / react-filepond

🔌 A handy FilePond adapter component for React
https://pqina.nl/filepond
MIT License
1.86k stars 90 forks source link

Pass name prop to <input/> #13

Closed vitordino closed 6 years ago

vitordino commented 6 years ago

first of all, congratulations on this amazing component 😄

besides accessibility, there are some services that use the name property on form elements — e.g. netlify

so if we could just pass this string down, it'll be a huge plus ✌️

vitordino commented 6 years ago

ps: i'm a true believer of JAMStack for small sites, so i'm really looking forward to integrate it on netlify's built in form handling.

if you have any idea for doing this, please light me the way because i'm not really good on understanding these backend details — i did read the documentation, including the server section, but i couldn't solve it right away

rikschennink commented 6 years ago

Hi! Glad to hear you like it!

The <input/> is not being submitted, it's basically only there to expose the "browse file system" functionality.

If you're uploading async, the name property is used as the name of the field that is posted to the server. If you're using the file encode plugin the name attribute is added to the hidden input elements that contain the encoded file data.

vitordino commented 6 years ago

understood, thats great (: will try it later then