0
<input hidden type="file" #file id="upload" (change)="uploadFile($event.target.files)" multiple>

uploadFile(event) {
this.message = '';
this.progressInfos = [];

for (let index = 0; index < event.length; index++) {
  const element = event[index];
  this.files.push(element);
  this.largeFiles.push(element);
}

this.selectedFiles = this.largeFiles;
console.log(this.selectedFiles);
for (let i = 0; i < this.selectedFiles.length; i++) {
  this.uploadAsync(i, this.selectedFiles[i]);
 }
}

I want to know the real path of the file, not the fake path. Is there any way to know the real path when uploading a file? I keep getting fake routes.

김세림
  • 291
  • 1
  • 5
  • 17
  • Does this answer your question? [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) – spots Oct 26 '20 at 02:52
  • @spots This is TypeScript, not JavaScript. – 김세림 Oct 26 '20 at 05:25
  • TypeScript just extends JavaScript by adding types. It gets turned into JavaScript when it's compiled. The language has nothing to do with knowing the full path because it's the browsers responsibility, and the browser won't tell you because it would be a security flaw. – spots Oct 26 '20 at 13:22

0 Answers0