Sorry, T-bird fired before ready. As I was saying: Krumo shows:
*
filename(/String,*12 characters*/)*P1000038.JPG*
*
uri(/String,*33 characters*/)*public://field/image/P1000038.JPG*
... but I really need this to work when the node is being created OR
updated. What hook should I be implementing instead?
On 02/05/2011 09:24 PM, Steve Yelvington wrote:
I have a content type with an image field. I want to pull some
metadata from the image file when the node is created or updated. I
thought this would be pretty straightforward, but I'm baffled by some
things that are going on in D7.
I thought I'd implement hook_node_presave(). Apparently the image file
isn't properly known by $node at that point. Krumo shows
field_image['und'][0] but none of its child elements have useful
information. And I have no idea what 'und' is all about.
I added node_load() to see if that would help. On an existing node, it
makes a difference. Krumo shows: