none
jQuery to download the file when clicking a link

    Question

  • Hi guys,

    My SharePoint environment is configured to open Office documents automatically in client applications and IE11 settings are such that the browser opens files without any prompts or warning messages. I do not want to change that.

    I have a requirement for just one library where, when users click links of the files, they would automatically be downloaded to their local disks (as if our sharepoint site was not in IE Trusted Sites).

    To complicate this further ;) I need this to happen for everybody, except one SharePoint group, who will have permissions to open server documents in their client apps (as in first paragraph of this post).

    Can I accomplish this with jQuery and if so, could anyone could help with the syntax?

    Thanks...

      

    Monday, April 28, 2014 8:04 AM

Answers

  • I have resolved this issue myself by adapting and playing with some jquery and spservices snippets I found on the net. Please see my blog post for a complete scenario and a the solution:

    http://sharepoint-for-real.blogspot.co.uk/2014/04/force-download-dialog-on-click-for-just.html

     
    Tuesday, April 29, 2014 9:03 AM