Posted by jeff00seattle on June 11, 2010 at 8:20am
Hi
I am new in using File API: http://drupal.org/node/555118
I was reading through some code of a posted Drupal module, and within it was a custom implementation of hook file_save: http://api.drupal.org/api/function/file_save/7
Question #1: When this module is added, then will Drupal call this module's implemented file_save hook upon every event that involves a file save/upload?
Question #2: If Question #1 is true, then is Drupal only providing user upload/saves of media (files) to be only within files directory (./sites/default/files/*)?
Thanks
Jeff in Seattle
Comments
_
file_save is not a hook, it's a function that actually has to be called explicitly to save a file. The hook is hook_file_insert which is linked right on that page.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.