L
L
lukka2020-05-15 14:51:53
JavaScript
lukka, 2020-05-15 14:51:53

How to process formData in node.js?

The client sends files using a request

const fData = new FormData()

fData.append('cover', dQS('[data-id="0"]').files[0])
fData.append('background', dQS('[data-id="1"]').files[0])

let response = fetch('/create-manga.js', {
    method: 'POST',
    body: fData,
})


How to accept these files on the server?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question