Get file name from input type file Angular2

后端 未结 6 1207
既然无缘
既然无缘 2021-02-19 08:33

I want get the file name from my html input tag in a modal view and save it using Angular2. Can someone help me?

6条回答
  •  感情败类
    2021-02-19 08:51

    You can try a more elegant option:

    HTML:

    
    

    Script:

    updateFile(file: HTMLInputElement) {
      let name = file.value;
    }
    

提交回复
热议问题