| Versions | |
|---|---|
| 4.7 | fileupload_execute(&$node) |
Implementation of hook_execute().
If a file was uploaded save it before updating the database.
developer/
<?php
function fileupload_execute(&$node) {
// if a file was uploaded, move it to the files directory
if ($file = file_check_upload('file')) {
$node->file = file_save_upload($file, file_directory_path(), false);
}
}
?>