Hello,
in order to upload documents you need to include the file uploader components found in the documentlibrary pages / templates. These include the upload dialog and the necessary flash component. You might need to adapt the Surf template for the task-edit page to include the regions for those components. You would also need to implement your own form control FTL and accompanying client JS which initializes and configures the uploader.
Regards
Axel