<input type="file" onChange={this.handleFileChange} />
private handleFileChange = (e: any) => {
console.log(e.target.files[0]);
}
With the above React code I have access to the file (could be pdf, text etc.) but I'm interested in knowing if there's a way to preview the file (via a URL) on the client side, ie, before its uploaded to the server.