none
Is there a way to automatically make 1 file in a Document Library forced to be downloaded? RRS feed

  • Question

  • I was asked if there was a way to force people into downloading the file before they can use the file. As the main file shouldn't be accessed/used until it is on the persons desktop.

    I think read access does this.. but was wondering if anyone had an answer to this question.



    • Edited by cowboy2066 Wednesday, February 1, 2017 6:14 PM
    Wednesday, February 1, 2017 6:14 PM

All replies

  • Hi,

    Yes you can. In any of the site add this script in markup file or add the content editor webpart and refer the JS file in it.

    <iframe id="my_iframe" style="display:none;"></iframe><script>function Download(url) {    document.getElementById('my_iframe').src = url;};</script>


    Please remember to click Mark as Answer on the answer if it helps you, Murugesa Pandian | MCPD | MCTS |

    Wednesday, February 1, 2017 7:01 PM
  • Hi ,

    Here you go

    https://social.technet.microsoft.com/Forums/office/en-US/5eff9f93-c799-43fc-96ca-bb1706716927/automatically-download-documents-from-sharepoint-document-library?forum=sharepointdevelopmentprevious


    Please remember to click Mark as Answer on the answer if it helps you

    Wednesday, February 1, 2017 7:04 PM
  • Pls check this as well

    https://social.technet.microsoft.com/Forums/office/en-US/4853aebd-d47a-4df0-bc7c-ad3e38800b1e/automatically-prompt-user-to-download-file-from-document-library?forum=sharepointdevelopmentlegacy


    Please remember to click Mark as Answer on the answer if it helps you

    Wednesday, February 1, 2017 7:04 PM