D
D
dreamniker2016-03-08 00:37:34
JavaScript
dreamniker, 2016-03-08 00:37:34

How to upload a file to the server in Meteor.js (or pure Node.js) from a form?

There is this simple form:

<form action="/up" method="post" target="hiddenframe" enctype="multipart/form-data">
        <input type="file" id="userfile" name="userfile" />
        <input type="submit" name="upload" id="upload" value="Загрузить" />
    </form>

How to handle such a request on the server to save a file that will be sent from this form on a button click?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2016-03-08
@Sanasol

https://github.com/tomitrescak/meteor-uploads
https://medium.com/@victorleungtw/how-to-upload-fi...

M
Mark Doe, 2016-03-08
@mourr

Or for example multer
https://github.com/pfafman/meteor-multer
https://www.npmjs.com/package/multer#readme

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question