This is a very basic, essential feature: I would like to send an email when a user downloads a file.
I did not see any trigger (core Drupal) nor event (Rules module) that detects such user action.

How this can be implemented?

Thanks for your help

Comments

amitaibu’s picture

Component: Rules Core » Rules Engine
Status: Active » Postponed (maintainer needs more info)

Maybe this module can help you. http://drupal.org/project/download_count
The thing is that you need to set the download method to private - i.e. Drupal servers the file. If it's public, Drupal is an-aware of the downloading.

So maybe you can have a rules integration with the download_count module.

amitaibu’s picture

Actually, it's enough to implement catch hook_file_download() - again for private download.

jvieille’s picture

I use Private Upload module so the File download method is set to public. (I need to restrict access depending on the role).
I haven't found any Rules integration with Download count.
How would I implement catch hook_file_download() ? (I am not a php programmer...)

mitchell’s picture

Title: How to catch a file download event? » Implement catch hook_file_download() event
Version: 6.x-1.0-beta4 » 6.x-1.x-dev
Component: Rules Engine » Provided module integration
Category: support » feature
Status: Postponed (maintainer needs more info) » Postponed
ginga8’s picture

I too am looking for similar functionality. I would like an email sent when a file is downloaded.

mitchell’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Status: Postponed » Active

See also: entity module's system.info.inc for existing file integration.

ginga8’s picture

Version: 7.x-2.x-dev » 6.x-1.x-dev

I am looking for how to send an event when a file is downloaded in drupal 6. Any help would be appropriated.

Thanks

mitchell’s picture

Component: Provided module integration » Rules Engine
Category: feature » support
tr’s picture

Component: Rules Engine » Rules Core
Issue summary: View changes
Status: Active » Closed (outdated)