Unlock a file download via callback pls I want to control a file access to download, a user will download the file only if a test condition is true. .... there is going to be an execution of a callback url from an external site, and my site will receive a signal then will unlock the file, so I use my site IP address as a test condition... if Server_remote address of my site is = the $external callback IP address, then....unlock the file, how do I proceed on that?

if you have a better idea of implementing this, let me know too.

cheers,
Sounds like a case for


Private file mode on a file field
A custom hook_file_download