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
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);
}
}