FastDFSClient 1.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package FastDFSClient --version 1.0.2
NuGet\Install-Package FastDFSClient -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FastDFSClient" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FastDFSClient --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FastDFSClient, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FastDFSClient as a Cake Addin #addin nuget:?package=FastDFSClient&version=1.0.2 // Install FastDFSClient as a Cake Tool #tool nuget:?package=FastDFSClient&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
using FastDFS; using FastDFS.Common; using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Text;
namespace ConsoleApp1 { class Program { static void Main(string[] args) { List<IPEndPoint> trackerIPs = new List<IPEndPoint>(); IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse("111.230.69.250"), 22122); trackerIPs.Add(endPoint); ConnectionManager.Initialize(trackerIPs); StorageNode node = FastDFSClient.GetStorageNode("group1");
byte[] content = null;
FileStream streamUpload = new FileStream(@"d:\11.jpg", FileMode.Open);
using (BinaryReader reader = new BinaryReader(streamUpload))
{
content = reader.ReadBytes((int)streamUpload.Length);
}
//string fileName = "";
//try
//{
// fileName = FastDFSClient.UploadFile(node, content, "jpg");
// Console.WriteLine("成功");
//}
//catch (Exception ex)
//{
// int i = 0;
// Console.WriteLine("失败");
//}
//Console.WriteLine(fileName);
var fileName = "M00/00/00/rBAADFsPVBuAKOecAAA9WzX2Czw556.jpg";
byte[] buffer = FastDFSClient.DownloadFile(node, fileName);
FileStream stream = new FileStream(@"D:\PUDjH8009.jpg", FileMode.Create);
using (BinaryWriter write = new BinaryWriter(stream, Encoding.UTF8))
{
write.Write(buffer);
}
stream.Close();
WebClient web = new WebClient();
web.DownloadFile("http://111.230.69.250:8889/group1/M00/00/00/rBAADFsPVBuAKOecAAA9WzX2Czw556.jpg", "D:\\abc.jpg");
Console.ReadKey();
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.