How to trigger an event on download

Hello,

Since razuna keeps track of download file information (i.e. who & when). Is there any way to create a “trigger” on a download event. I have reviewed the documentation for the workflow plugin and there does not seem to be a “download” event. Did I miss something?

If there is not a built in way to fire an external action once a file is downloaded. Does anyone have a suggestion as to how it could be done with the php api.

My end goal is to have the ability to change the status of an assets, after it is download.

Thanks,
Carl

Hi,

This is interesting. However, I wonder what constitutes a “download” since a download can be done from an external URL or from within Razuna.

Currently there is no API and no workflow action in Razuna for this. We can make a note of this for Razuna 2.0.

Thanks.

Hi,

First thank you for your reply. And perhaps pointing me in another more workable solution;

Has anyone (including razuna) ever implemented a “download wrapper” where the download link of an asset is not a direct link but rather a child page/function that contains fields to be filled out before an asset can be downloaded.

I see how I could query the file link in the database, to supply a download wrapper with the file location from the id. But do not know where/how to update the download link.

If this kind of functionality has not been implemented by anyone, are there any basic issues with attempting to implement this kind of change?

Thanks,
Carl

Hi,

There is no “download-wrapper” in Razuna 1.7.x. We could achieve something like this with the workflow module. However, as we are moving towards Razuna 2.0 this could be a plugin or feature in Razuna 2.0. I will make a not of it.

Thank you for reporting this and making Razuna better.

@Nitai: Could you please elaborate a bit more on how this kind of functionality could be achieved using your workflow plugin?

I’m really interested in finding a workable solution to this (something like indirect download tracking).

Thanks in advance.

There is nothing to elaborate on as this is not available. You would have to build it yourself right now. Something like:

  1. Capture the download URL (can be done with some re-write module)
  2. Redirect the download to your script
  3. Track it and populate your own db or whatever.
  4. Retrieve the file from Razuna over API and present it to the browser.
1 Like