-
Notifications
You must be signed in to change notification settings - Fork 744
.net 上传文件到go fastdfs
BigChen edited this page May 27, 2019
·
1 revision
使用的restsharp
public static IRestResponse Base64toTFS(string reqNo, Lic_FileEntity file)
{
var contents = Convert.FromBase64String(file.data.data);
var client = new RestClient("http://localhost:8080/upload");
var request = new RestRequest(Method.POST);
request.AddFileBytes("file", contents, file.data.name);
request.AddParameter("path",reqNo);
request.AddParameter("output", "json");
request.AddParameter("scene", "image");
IRestResponse response = client.Execute(request);
return response;
}