imagefield and temp files? I am using imagefield and D6 with filepaths to upload images to a custom directory using a custom token.

I'd like to validate whether an image that was uploaded is the same as another image in the repository.

I see that imagefile appears to be uploading the file to: default/files/, then deleting it there and saving in the directory I specify using my custom token.

Is default/files where imagefield is saving the file as a "temp" file until validation passes? I would think it would save a temp file in the temp file location specified by php.ini. If the later is true, can I get a hold of the tmp name in $form_state? I believe with image module, I could get the temp name of the file from $form_state, but I don't see that info using imagefield. Thanks in advance.
In file settings you specify a temp path and a files path, which is what is used by Drupal.

The temp path which could be /tmp, but it could also be default/files that is entirely up to you. the temp file folder is where files are uploaded to after being submitted in a form. After validation checks, file_save_upload should be used to save the file. There is no reason for the file to be saved to the default/files folder and then be moved, as it can be saved directly to whichever folder you want. I do believe that is how the imagemodule does it..