点击或拖拽改变大小

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 中) 版本:11.8.2.0 (11.8.2.0)
语法
protected OperateResult UploadFileBase(
	Object source,
	string serverName,
	string factory,
	string group,
	string id,
	string fileTag,
	string fileUpload,
	Action<long, long> processReport
)

参数

source
类型:SystemObject
数据源,可以是文件名,也可以是数据流
serverName
类型:SystemString
在服务器保存的文件名,不包含驱动器路径
factory
类型:SystemString
一级分类
group
类型:SystemString
二级分类
id
类型:SystemString
三级分类
fileTag
类型:SystemString
文件的描述
fileUpload
类型:SystemString
文件的上传人
processReport
类型:SystemActionInt64, Int64
汇报进度,第一个数据是已完成总接字节数,第二个数据是总字节数。

返回值

类型:OperateResult
是否成功的结果对象
参见