Even thought we will try to help you on this approach, we are not experts on how to use Alfresco. I would suggest you to go to their official forums and create or search for a similar case. For example, could this work for you?: Alfresco Forums: Create custom control upload document