Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
looks like it does, but it actually doesn't receive it in the first place. i need it for audio filefield... here's a patch
Comment | File | Size | Author |
---|---|---|---|
filefield_file_load.patch | 1.27 KB | aaron |
Comments
Comment #1
jpetso CreditAttribution: jpetso commentedHm... hook_file() does not pass any additional info at all for the 'file_load' action. I wonder if it's a good idea to add this when we know it'll be gone soon anyways.
And more questions, just because I'm interested:
- why do you pass $item one time and $node the other time?
- why is there an additional unused $file parameter in the _filefield_file_load() function signature? doesn't that even conflict with $fid being passed?
- if you need $item, wouldn't it make more sense to merge the CCK-provided part of $item first, before invoking the hook?
- how (and which parameters) are you going to use this when it gets in?
I'm setting this back to "code needs work", if not for the other issues then at least because the $file parameter seems odd to me.
Comment #2
dopry CreditAttribution: dopry commented@aaron, hook_filefield is a prototype of hook_file... Why do you need the field information when saving the file data? how are you using it? I need clarification on the use case... we may need to overload hook_file for field based purposes, or attach the field info to the items if there isn't a work around.
Comment #3
dopry CreditAttribution: dopry commentedno response and this issue is by design to match hook_file as proposed for core.