I am currently working on a Jquery file upload project and I have decided not to use any plugins. My goal is to achieve this using Pure Jquery / JavaScript. Instead of previewing the file, I want to display a link (View) once the image or PDF is uploaded. If the user clicks the link, it should open in a new page.
Below is my HTML Code:
Could someone provide guidance on how to accomplish this?
<div class="mob_pass">
<label class="ctm_fnt">Attach document</label>
<br>
<div class="custom-file-input">
<input type="file">
<input type="text" class="txt_field ctm_widt" placeholder="Attached File">
<button class="cst_select">
<i class="fa fa-rotate-90"></i> Attach
</button>
</div>
</div>
I would appreciate any assistance on this matter.
Thank you in advance!
Here is the fiddle link