[support] how to access filefield with hook_nodeapi

Sudheer sudheer.s at binaryvibes.co.in
Mon Jan 21 17:10:08 UTC 2008


Hello,

First of all I would like to thank this lits for all the support I am 
receiving.

I am writing my first module. I would appreciate any help with my question.

I have created a content type called application. I am using two text 
fields and one filefield with this content type created using CCK. I am 
writing a custom module that does some operation on this node type when 
it is being created. Therefore I am using hook_nodeapi() in my custom 
module.

function loadapp_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){
    switch ($op) {
 case'submit':
// Do operations here          
        break;
    }
}

 I want to extract some information from this uploaded file and perform 
few other operations when the node is being created. I believe this be 
done with hook_nodeapi(). But how is the question. How can I access the 
filefield field when $op is 'submit'?


-- 

With warm regards,
Sudheer. S
http://binaryvibes.co.in




More information about the support mailing list