I have created input element to accept 'file' type like below.
<input type='file' onChange = onFileUpload()>
On uploading the file, I have a field which shows the file name. Now when user clicks on the file name it must open the file in new window for preview. Is there a way to generate URL for this or any other way to open the uploaded file in new window?