I had discovered a slightly different solution on my own which seems to work but wasn't sure why:
I set the upload behavior and then noticed that the bindings panel created a Session form_upload1 binding.
Then after specifying to use a template with Create Email, I open the template file and dragged the Session binding to the template. Then I wrap it in the link code. (You can have multiple upload behaviors which create multiple Session bindings).
Not sure where the session binding is coming from since it doesn't appear until after I create the upload and then it's available site wide.
My template code which is slightly different than yours (but works):
<a href="http://www.mydomian.com/path/to/file<?php echo $_SESSION['form_upload1']; ?>"><?php echo $_SESSION['form_upload1']; ?></a>
The WA_DFP_SetupUploadStatusStruct(...) code wasn't modified (and does not include any SESSION variable).
It's a mystery to me why it works since I don't see anywhere the session variable is being set.
Please advise if you see a flaw in this process - as it's pretty easy to implement.