Fixing camera API for correct collaboration with UploadFileServlet and HostFileServlet, moving to jQuery ui dialog