Download a document and save on a local at the same time?

Certified Senior Developer

Is it possible to download a document through documentDownloadLink and save on a local (better if writing on db) at the same time? With one click?

The need is to know if a document has been downloaded or not.

  Discussion posts and replies are publicly visible