D7: Getting attached files from nid and field name
7 Jul
2011
7 Jul
'11
10:08 a.m.
Hi everyone, In Drupal 7.x, given a nid and a file field name, I'm trying to get the files (as fids or file objects) which have been uploaded as file attachments to that node. Drupal will populate $node->{$field_name} only when there are files set as "displayed" but I need to do this for all the files of that field, no matters how their display setting is. I've spent quite some time investigating into this but the new d7 file api looks pretty obscure from a documentation and code point of view. IMHO, too much "drupal magic" happening there for a fast understanding. Any pointer to good documentation and/or suggestion on the solution greatly appreciated. Thanks, Fabio Varesano
5463
Age (days ago)
5463
Last active (days ago)
0 comments
1 participants
participants (1)
-
Fabio Varesano