Perl validating file names Livechat free credits
* I'm basically preempting drupal_move_uploaded_file() by moving the * file from /tmp to the same target destination as an existing file.* * This is done before drupal_move_uploaded_file is called within the * first call to file_save_upload().
2.) Every single time I try your code, my files that I try to attach keep getting numbers attached to them (i.e. It is useful to think of the file_save_upload function as part of form processing.
* Such as $file-replace = FILE_EXISTS_REPLACE therefore, each file * would be in control of whether it should replace or not and modules * could modify this at various stages.
*/ function my_module_file_validate($file) Your code doesn't seem to work--unless I'm doing something wrong here.
This is probably an edge case, but the code may be useful to someone else. * * Replacing a managed file with the same-named file.
* * This is a total hack since there is no hook_presave_upload.