Reputation: 4577
I am trying to use FilePond, uploading is going well but I try to implement the "DELETE" feature to remove from the server unwanted file by the user. I've followed the documentation ( https://pqina.nl/filepond/docs/patterns/api/server/ ) , my "/upload" fonction is called with a DELETE method, but no id! And I confirm that I pass the ID correctly on the client side....
// Here is my node.js backed...
//
app.delete('/upload', function(req, res) {
console.log("Delete",req.body); // This is always empty.....
});
Upvotes: 1
Views: 1042
Reputation: 55
I know this is too late, but maybe it can to help someone in the future.
FilePond send id
of the deleting file as text/plain
. So you need to use body-parser before.
app.use(bodyParser.text());
Upvotes: 2