Ubercart implements a hook called hook_file_transfer_alter that allows modules to alter the file download at the moment the customer downloads it. E.g. adding a stamp or watermark with the customer's email or the order id #. See http://www.ubercart.org/docs/api/hook_file_transfer_alter for details.
Is this functionality currently possible in Drupal Commerce? I looked through the Commerce File code, but didn't see anything that would have duplicated the function of hook_file_transfer_alter.
Comments
Comment #1
bjornarneson commented*bump*
Anyone else sorted this issue out or developed a slick work-around?
Comment #2
F.G commented+1, i will appreciate this kind of option to prevent multiple online copy
This file containt your private file order, don't publish it online.
Comment #3
kloewer commentedDid anyone make any progress with this issue?
Comment #4
recrit commentedThis functionality can be accomplished by using a file stream that supports altering. I've created http://drupal.org/project/private_dynamic_stream which mimics Drupal's private file system but provides a hook to append any text to the end of the file (@see private_dynamic_stream.api.php for hook details).
The module has just been created and so only git / dev download is available.
If you wanted to update already created files:
Comment #5
recrit commentedComment #6
recrit commented