点击或拖拽改变大小

MqttSyncClientUploadFileAsync 方法 (Bitmap, String, String, String, ActionInt64, Int64)

上传一个Bitmap图片对象到服务器指定的分类下面,需要指定分类信息,服务器保存的文件名,描述信息,支持进度报告
Upload a Bitmap image object to the category specified by the server, you need to specify the category information, the file name saved by the server, description information, and support for progress reports

命名空间:  HslCommunication.MQTT
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:10.6.1.0 (10.6.1.0)
语法
public Task<OperateResult> UploadFileAsync(
	Bitmap bitmap,
	string groups,
	string serverName,
	string fileTag,
	Action<long, long> processReport
)

参数

bitmap
类型:System.DrawingBitmap
图片对象
groups
类型:SystemString
文件的类别,例如 Files/Personal/Admin 按照斜杠来区分
serverName
类型:SystemString
在服务器保存的文件名称
fileTag
类型:SystemString
文件的额外的描述信息
processReport
类型:SystemActionInt64, Int64
进度报告,第一个参数是已完成字节数,第二个参数是总字节数

返回值

类型:TaskOperateResult
是否上传成功
参见