filepond icon indicating copy to clipboard operation
filepond copied to clipboard

No way to add data to chunks

Open CupCodeIr opened this issue 4 years ago • 5 comments

Is your feature request related to a problem? Please describe. I'm using this library but there is no way to add form data or even header data to file chunks. additional data on will be sent with the first post request and on patch requests there is no way to add those data

Describe the solution you'd like A straightforward way to add data to requests that send chinks.

Additional context Add any other context or screenshots about the feature request here.

CupCodeIr avatar Jul 09 '21 14:07 CupCodeIr

https://pqina.nl/filepond/docs/api/server/#object-configuration

You can use the headers property or use ondata to add data to the post, you can also set headers to a function and return an object.

rikschennink avatar Jul 09 '21 14:07 rikschennink

https://pqina.nl/filepond/docs/api/server/#object-configuration

You can use the headers property or use ondata to add data to the post, you can also set headers to a function and return an object.

Neither headers nor form data will not be in the patch requests (having chunks)

CupCodeIr avatar Jul 09 '21 15:07 CupCodeIr

Please create a public reproduction of the issue on codesandbox.io

rikschennink avatar Jul 09 '21 15:07 rikschennink

Please create a public reproduction of the issue on codesandbox.io

Excuse me but I don't know how to work with codesandbox.io. Also changing onload implementation results in a hidden filepond input field with 'undefined' value. In other words, if I customize 'onload', serverId of uploaded file not being saved so further request to server will not carry file id(undefined)

CupCodeIr avatar Jul 09 '21 16:07 CupCodeIr

I don't know why it's not working in your project. You've not added any code to the issue so I can't help investigate. Will close if no additional info is provided.

rikschennink avatar Jul 12 '21 06:07 rikschennink