· 6 years ago · Jul 02, 2019, 05:04 AM
1<form action="/upload" method="POST" enctype="multipart/form-data" >
2 <div class="file-field input-field">
3 <div class="btn grey">
4 <span>File</span>
5 <input name="myImage" type="file" multiple="multiple">
6 </div>
7 <div class="file-path-wrapper">
8 <input class="file-path validate" type="text">
9 </div>
10
11 </div>
12 <button type="submit" class="btn">Submit</button>
13 </form>
14
15var mailOptions = {
16 from: '****@gmail.com',
17 to: '*****@gmail.com',
18 subject: 'test',
19 text: 'test',
20 attachments: [{
21 // how to get the path of the selected file
22 }]
23 };