How what? The first thing you need to do is find the code. Then you should become familiar with the process used to upload files and see if there is a hook location that you can plugin to in order to add the code to read the file contents and insert it into the database. Then, after you've got it into the database, you'll have to look at the showthread page and see about adding a query to read the file list back from the database and spit it back out into the thread.
It's gonna take a little bit of time and you're gonna have to do a little bit of homework to get familiar with the upload attachment system and then the spit-out attachment part of the showthread page.