bergben / ng2-file-input

Angular 2 component that implements a drag and drop or select file selection, including preview.
MIT License
25 stars 11 forks source link

fully qualified path in event #9

Closed scottellis64 closed 7 years ago

scottellis64 commented 7 years ago

I'm not seeing the full path in the file-added event. Am I able to get to the file content once the file is selected, or the full path of the file selected?

bergben commented 7 years ago

Hi @scottellis64, if you mean the full path to the file that the user has selected then the answer is no, you won't be able to get the full path because of JavaScript security restrictions... Please refer to this question on SO

scottellis64 commented 7 years ago

Thanks, I was just about to retract the question because I figured out how to acquire the content of the file through the FileReader API. Thanks!