Well, instead of sending the content just store the file on disk and keep a reference to that file so that you know the file belongs to a certain record.
When requested get the file from disk and send it. I don't get your problem here? Either this is a "write the code for me" style question or are you simply asking for that concept?