批量数据上传客户端例子代码FastDFS本实例在开发中有用的可以参考。
Console.Write("please input command[1,2,3,4]:");
var cmd = Console.ReadLine();
switch (cmd)
{
case "1":
ConnectionManager.InitializeForConfigSection(config);
break;
case "2":
storageNode = FastDFSClient.GetStorageNode(config.GroupName);
Console.WriteLine(storageNode.EndPoint);
break;
case "3":
fileName = FastDFSClient.UploadFile(storageNode, File.ReadAllBytes("test.jpg"), "jpg");
Console.WriteLine(fileName);
break;
case "4":
FastDFSClient.RemoveFile(config.GroupName, fileName);
break;
}
上一篇 cms内容管理系统完整代码