1

There is a file upload field(which uploads zip files) . I want to get the name of file in node_presave , How do I do it?

1 Answer 1

1

try some thing like

function module_node_presave($node)
{
   if($node->type=='article'){

       $file = file_load($node->field_zip['und'][0]['fid']);
       dpm($file->filename);
   }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.