add publishresource, use base64 to encode the content of torrent