B
B
Bogdan2019-11-24 23:40:54
Node.js
Bogdan, 2019-11-24 23:40:54

Get file in stream?

Hello, can you tell me? Is it possible to somehow get the file in the stream, which is loaded through the form.

<form
    action = '/add'
    method = 'post'
    enctype = 'multipart/form-data'
    class = 'form'
  >
    <label class = 'btn'>
    Выбрать и отправить файл
    <input
      type = 'file'
      name = 'file'
      class = 'input-file__input'
      onchange = 'this.form.submit();'
    />
  </label>
  </form>

I googled the solution through multer, first upload the file, and then read it into the stream. Or maybe there is a solution that would immediately read into the stream, thanks.

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