0

Hey I want to upload excel files. I use this code to select the files:

<input type="file" id="files" name="files[]" />
<output id="list"></output>

<script>
function dateiauswahl(evt) {
        var files = evt.target.files; // FileList object

        var output = [];

        for (var i = 0, f; f = files[i]; i++) {
            output.push('<li><strong>', f.name, '</strong> (', f.type || 'n/a', ') - ',
                f.size, ' bytes</li>');
        }

        document.getElementById('list')
            .innerHTML = '<ul>' + output.join('') + '</ul>';
    }

document.getElementById('files')
    .addEventListener('change', dateiauswahl, false);
</script>

(It is from https://wiki.selfhtml.org/wiki/JavaScript/File_Upload)

How can I get the full file path out of this? I need the file path to keep on going with "PHPExcel".

  • Modern browsers will not give you access to the full file-path. – Riscie Aug 15 '17 at 12:51
  • Possible duplicate of [How to get full path of selected file on change of using javascript, jquery-ajax?](https://stackoverflow.com/questions/15201071/how-to-get-full-path-of-selected-file-on-change-of-input-type-file-using-jav) – Riscie Aug 15 '17 at 12:52

0 Answers0