Customization Of Upload Dialog

Dear All,
The built in File manager of erpnext is not sufficient to meet my client’s requirements therefore I have to customize the upload dialog. So what I want to do is:

  1. Add more optional field on upload dialog like (naming series, file type .etc)
  2. To do something when attach/upload button is clicked.

If someone could tell me what are the parameters of upload dialog and what they do and how to tweaks this dialog ?

I would be very thankful and appreciate your kindness.

Thanks.