Active
Project:
Web File Manager
Version:
6.x-2.12
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
20 Mar 2010 at 14:21 UTC
Updated:
25 Aug 2016 at 14:08 UTC
Comments
Comment #1
mat. commentedsubscribed
Comment #2
drupaledmonk commentedI was wondering if there was a trigger when a user downloads a file. Can anyone help on how to create a custom trigger? At least a place as to where to start.
Comment #3
cgmonroe commentedThere are no upload or download triggers in the current code. If you want to patch it to support this, here's some functions to start looking at:
Upload triggers:
Look at webfm_version_upload function and the various options it handles. E.g. do you want to trigger on new files or replacement files, etc.
Download triggers:
Look at the webfm_send_file() function.
Some general programming docs for webfm are located at:
http://drupal.org/node/730368
Comment #4
drupaledmonk commentedThanks a lot cgmonroe for the docs,resources.
Comment #5
drupaledmonk commentedI wanted to send a email when a user downloads a file, So I implemented hook_mail() in webfm.module to achieve this. The code is very crude and just achieves what I want.
http://api.drupal.org/api/function/drupal_mail/6
In the function
webfm_send_file($fid, $download = false, $bypass_invoke = false)
else if you just want to send freaking email then in the
webfm_send_file($fid, $download = false, $bypass_invoke = false)
Comment #6
ceejs commentedIt would be nice if it worked with the 'Action e-mail role' module.
Comment #7
Matilda commentedIs there a way to declare webfm-uploads as a content type - webfmUpload for example?
Comment #8
guymelef commentedAnyone who has a solution or suggestion to this issue?