Download file after login I'm looking for direction with regards to how to get a file to download only after you are logged in, and to be prompted to login if you try to download it and then upon a correct submission, have that file automatically download.  The login form is to be presented in a modal dialog upon clicking the file when logged out.

Right now I have the modal form displaying when clicking the file download link, but I essentially need to reconstruct the login mechanism to work via AJAX I believe.  This includes validations and establishing the user's logged in session.  I'm not sure how to go about it... thoughts from the Drupal Answers community?
Private files download permission


  Version 1.x provided "two useful features which Drupal itself is
  missing: a simple permission to allow downloading of private files by
  role, plus the ability to combine both public and private downloads".
  
  Version 2.x removes the "global" permission and implements a
  per-directory by-user and by-role filter instead, to let the
  administrator better tweak the whole website and increment the overall
  security.


with this module you can achieve your requirement by following this tutorial source

Hope it helps you!