Where's the code that puts the uploaded file description into the editor?

Can you say more about what you want to do? I don’t know whether you might do it in a theme component or if you’d need a plugin.