pqina / vue-filepond

🔌 A handy FilePond adapter component for Vue
https://pqina.nl/filepond
MIT License
1.94k stars 128 forks source link

Basic file upload not working (from tutorial) #147

Closed ddsky closed 4 years ago

ddsky commented 4 years ago

Summary

There are two fields with the same name in the post request, one is {"color":null} which I don't know where it would come from. This is the post request by filepond after simply dropping one image:

------WebKitFormBoundary6sI6X8ElCESMDSBK
Content-Disposition: form-data; name="image"

{"color":null}
------WebKitFormBoundary6sI6X8ElCESMDSBK
Content-Disposition: form-data; name="image"; filename="IMG_20180305_201526.jpg"
Content-Type: image/jpeg

------WebKitFormBoundary6sI6X8ElCESMDSBK--

How to reproduce

Just use the sample HTML code from this tutorial: https://pqina.nl/filepond/docs/patterns/frameworks/vue/

Select an image and you can see the faulty post request in the browsers developer bar.

Expected behaviour

Upload a file instead of {color:null}

Additional information

Environment Version
OS Windows 10
Device Desktop
Browser Chrome 80
rikschennink commented 4 years ago

Please see: https://pqina.nl/filepond/docs/patterns/api/server/#process

Along with the file object, FilePond also sends the file metadata to the server, both these objects are given the same name.

aarondt1 commented 2 years ago

Is there any way to disable FilePond from sending the file metadata to the server?

rikschennink commented 2 years ago

Hi, currently not, you'd have to set up a custom processing method, you can use this one: https://pqina.nl/filepond/docs/api/server/#process-1