FileClientBaseUploadFileBase 方法 |
上传文件给服务器,需要指定上传的数据内容,上传到服务器的分类信息,支持进度汇报功能。
To upload files to the server, you need to specify the content of the uploaded data,
the classification information uploaded to the server, and support the progress report function.
命名空间:
HslCommunication.Enthernet
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 protected OperateResult UploadFileBase(
Object source,
string serverName,
string factory,
string group,
string id,
string fileTag,
string fileUpload,
Action<long, long> processReport
)
Protected Function UploadFileBase (
source As Object,
serverName As String,
factory As String,
group As String,
id As String,
fileTag As String,
fileUpload As String,
processReport As Action(Of Long, Long)
) As OperateResult
protected:
OperateResult^ UploadFileBase(
Object^ source,
String^ serverName,
String^ factory,
String^ group,
String^ id,
String^ fileTag,
String^ fileUpload,
Action<long long, long long>^ processReport
)
member UploadFileBase :
source : Object *
serverName : string *
factory : string *
group : string *
id : string *
fileTag : string *
fileUpload : string *
processReport : Action<int64, int64> -> OperateResult
参数
- source
- 类型:SystemObject
数据源,可以是文件名,也可以是数据流 - serverName
- 类型:SystemString
在服务器保存的文件名,不包含驱动器路径 - factory
- 类型:SystemString
一级分类 - group
- 类型:SystemString
二级分类 - id
- 类型:SystemString
三级分类 - fileTag
- 类型:SystemString
文件的描述 - fileUpload
- 类型:SystemString
文件的上传人 - processReport
- 类型:SystemActionInt64, Int64
汇报进度,第一个数据是已完成总接字节数,第二个数据是总字节数。
返回值
类型:
OperateResult是否成功的结果对象
参见