How to track how many times a file has been downloaded?

I created a module (name=repository) with two fields [Title (input text) & File (File Upload)]. I would like to track how many times a file in the repository module was downloaded and by who. I know that a workflow is the way to go, but I’m not sure of the event that I need to use in the workflow to trigger the workflow to execute and capture of the user and the file downloaded into a download Log module. Any idea if this can be accomplished, using workflow or other way?

Personally i don’t know of a way unfortunately. @tjerman ?

Thanks for the reply. I have been thinking about a workaround, one of the options is to make the download a two steps process. I will create a DownloadLog module that consists of userID, Repository.recordID & File-to-be-downloaded. I will hide the File (File upload) field in the repository record and add an automation button “Request File” to the repository record page. l will link the “Request File” button to a workflow that will copy the content of the repository record into the DownloadLog. When the button is clicked, I will run the workflow and take the user to the DownloadLog page to download the file requested. I will use the DownloadLog module to track the downloads. Is this approach make sense?

Hello

You can try file downloads by creating a custom endpoints that serve the files.

Thank you

Thanks boblewis, I was able to achieve the tracking by following the steps I described earlier. I’m, however, eager to learn everything about Corteza. Could you explain the option you introduced in details, or give me an example?
Having said that, I believe the need of a detailed audit log in Corteza is a must. A historical log of who viewed, edited, deleted, selected and downloaded a resource and when is a main requirement in many business/government applications.