[Serializable]public class VehicleForm{ [Prompt("When did this happen")] public DateTime LossDate { get; set; } [Prompt("Please upload proof image")] public byte Picture { get; set; }我希望用户能够在机器人框架中填写表单时包含图像。我将图片字段声明为字节,但在上传图片时不起作用。这有可能实现吗?如果是,请有人向我介绍如何去做吗?谢谢
1 回答
慕斯王
TA贡献1864条经验 获得超2个赞
SDK Repository 中有一个示例,用于执行此操作。
从示例中看来,您需要使用该AwaitableAttachment类型,请查看ImagesForm:
// Attachment field has no validation - any attachment would work
public AwaitableAttachment BestImage;
// Attachment field is optional - validation is done through AttachmentContentTypeValidator usage
[Optional]
[AttachmentContentTypeValidator(ContentType = "png")]
public AwaitableAttachment SecondaryImage;
- 1 回答
- 0 关注
- 137 浏览
添加回答
举报
0/150
提交
取消