0

I'm using an Angular MEAN stack. ( Node, Express, Angular, Mongo/Mongoose).

I'm trying to figure out how to upload an image using the input type file.

HTML as it stands:

<form method="post" enctype="multipart/form-data" action="/upload">
    <label class="app-file-input button">
        <span>Upload</span>
        <i class="icon-enter"></i>
        <input type="file"/>
    </label>
</form>

I've added the input html but I'm wondering how I would go about storing that image so I can call for it at any point. Would I have to do this in the controller? And then push it to my middleware?

If you are aware of any good tutorials on this subject please let me know.

Zagonine
  • 2,213
  • 3
  • 22
  • 29
Max Lynn
  • 1,738
  • 6
  • 22
  • 35