I'm having a form having 2 field, both files, but one hidden, one is visible.

User is allowed to upload a pdf file.

I'm using hook_form_alter to provide a custom validate handler, and in function "XXX_validator($form, &$form_state)", I'm getting thumbnail picture of pdf by using 'convert()', and now I want to store it into my hidden field. But, I'm not able to set it.

Brief information about fields:
field_computed_name is the name of hidden field which I want to set.
I computed $newVal = array('filepath' => $targetFilePath,
                                'filename' => $tfName,
                                'filemime' => file_get_mimetype($tfName))

Finally, I'm using form_set_value($form['field_project_thumb'][0], $newVal, $form_state);

Which is not working. Please help