Quite understandable. :D
Catching an identifier and attaching it to a file name is part of the upload-file syntax. You do have to assume that your user uploads the proper file. Unless you use ActiveX or some such dangerous extension, your user does have to save the edited template and then upload it manually to a File Upload dialog on your web system.
That said, you can use Perl to grab either a stored cookie value or a login ID from a log in sequence and create a filename from one of those values.