close #31 Restore upload dialog state after close