If you edit a post then press the Attachments button to bring up that popup, then do "View Source" on that popup window, I think it might have everything you need.
Yea im trying to do just that, I took all the variables in the form submission, put them into my custom html and tried submitting from my custom php file and it just wont take. I cant wrap my head around the issue...