Before the upload, you'll need to figure out what the file name is. If you are basing the name off of what the user uploads, then you'll have to wait until the upload is complete when your script will get the file and the name of that file. Check out [man]file_exists[/man] on how to check if a file exists or not.