W
W
woodyJS2019-02-14 02:13:56
Node.js
woodyJS, 2019-02-14 02:13:56

How to process the file received from the form?

Good afternoon.
How to properly process the file (translating it into a string) that we received when submitting the form?
part of the form (Pug)

form(action='/', method='POST')
    input(type='submit',name="downloaded_file", value='Submit')

the part where the post request is processed
app.post("/", function (req, res) {
    var array = fs.readFileSync('здесь был путь для лок файла, когда изучал обработку', "utf8").toString().split("\n");
 ....

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