Hi Honza,
Try to check method GET_UPLOAD of class CL_GS_CM_ADDDOC_IMPL. It will show you how to get the information from your file by using a reference of type CL_THTMLB_FILEUPLOAD.
From there, I believe you'll be able to retrieve the information you need by checking corresponding class attributes.
See if this helps you a little more.
Kind regards,
Garcia