Hi Harsh,
If you want to download file using JavaScript, we need to get the files url and file name firstly, and then download the file with url.
For getting file url and file name using JavaScript Client Object Model, you can refer the thread below:
get Library document URL using Javascript client object model
Code demo about downloading file using JavaScript:
Save files on disk using JavaScript or JQuery!
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
tnmff@microsoft.com.
