The site has the ability to upload a file using a standard browser form. "Select File" button.
<form class="file-form" enctype="multipart/form-data" method="post"> <input type="file" class="file-for-import" required="required" /> </form> Action handling is done using the Marionette framework.
var MainImportView = Mn.LayoutView.extend({ template: $(html)[0].outerHTML, ui: { file: '.file-for-import', generate: '.gen-tab', import: '.to-import' }, events: { 'click @ui.file': 'loadFile', // read content from file 'click @ui.generate': 'readFields', 'click @ui.import': 'import' }, loadFile: function(e) { var file = this.ui.file[0].value; }, ... }); And this file is defined as C: \ fakepath \ test.txt , although the selected test.txt file is in a different directory and generally on disk D. Why is the correct path not loaded?