--- modules/node/node.api.php 2015-08-19 23:20:31.000000000 +0200 +++ modules/node/node.api.php 2016-07-07 20:25:52.000000000 +0200 @@ -1084,19 +1089,9 @@ * @ingroup node_api_hooks */ function hook_prepare($node) { - $file = file_save_upload($field_name, _image_filename($file->filename, NULL, TRUE)); - if ($file) { - if (!image_get_info($file->uri)) { - form_set_error($field_name, t('Uploaded file is not a valid image')); - return; - } - } - else { - return; + if (!isset($node->mymodule_value)) { + $node->mymodule_value = 'foo'; } - $node->images['_original'] = $file->uri; - _image_build_derivatives($node, TRUE); - $node->new_file = TRUE; } /**