Hey Everyone,
Just wondering can anyone tell me how to access the file field variable in drupal? I can access the rest of the node's variabels with the following php:
$node->field_event[0]['value'];
But I do not know how to access the content of a file field called field_pdf.
I know it is created with something like:
$node->field_pdf = array( array( 'fid' => $file->fid, 'title' => basename($file->filename), 'filename' => $file->filename, 'filepath' => $file->filepath, 'filesize' => $file->filesize, 'mimetype' => $mime, 'description' => basename($file->filename), 'list' => 1, ), );
I solved thie problem with the following snippet:
$node->field_pdf[0]['filepath'];
Hope this helps somebody.
j