storing email attachments metadata
===

I have an email system and I am looking to add an attachment feature. My issue, is after the user uploads their attachment file to my server I want to link the filename to their session somehow. 
So they click upload, a popup comes up prompting them to browse for the file and upload, when the process is done (file is now on my server and popup closes). I want to somehow show the user the attachment that will be sent with the email (just the filename). 

Would I do this in a database or in a cookie.
Basically linking the session id with a filename(s) of the attachments.

I am currently thinking of doing this in a cookie. I am not sure how safe that is. Or this is open to any exploits 