ng-model for `<input type=“file”/>` (with directive DEMO)

后端 未结 12 2266
北恋
北恋 2020-11-21 06:40

I tried to use ng-model on input tag with type file:


But after selecting a file, in

12条回答
  •  太阳男子
    2020-11-21 06:54

    Try this,this is working for me in angular JS

        let fileToUpload = `${documentLocation}/${documentType}.pdf`;
        let absoluteFilePath = path.resolve(__dirname, fileToUpload);
        console.log(`Uploading document ${absoluteFilePath}`);
        element.all(by.css("input[type='file']")).sendKeys(absoluteFilePath);
    

提交回复
热议问题