0

I am a student.

-Is there a way to fill the file input with the right filename from a file drop? I've already read all the answers at drag drop files into standard html file input

However, no answer there works for Angular 4. I guess there is always a problem with Typescript I cannot see.

phse
  • 11
  • 1
  • 3

1 Answers1

0

you can achieve it by either creating a fileupload directive or use existing modules on npm. i would recommend use a existing module because it would be well tested already. and you can easily import it in your solution

here are some references to the modules on npm

ngx-file-drop

ng4-files

also here is a tutorial how create a file drop directive . Drag and Drop file directive in angular2

hannad rehman
  • 4,133
  • 3
  • 33
  • 55