Hi Kowshik,
Which plugin npm module are you using for the file upload functionality. IMO you will have to specify a parameter/flag to file upload control to select the folder itself.
You can try the HTML 5 file uploader
<input type="file" id="ctrl" webkitdirectory directory multiple/>
Please check for browser compatibility and play around with flags and other option supports