[Serializable]public class VehicleForm{ [Prompt("When did this happen")] public DateTime LossDate { get; set; } [Prompt("Please upload proof image")] public byte Picture { get; set; }我希望用戶能夠在機器人框架中填寫表單時包含圖像。我將圖片字段聲明為字節(jié),但在上傳圖片時不起作用。這有可能實現(xiàn)嗎?如果是,請有人向我介紹如何去做嗎?謝謝
1 回答

慕斯王
TA貢獻1864條經(jīng)驗 獲得超2個贊
SDK Repository 中有一個示例,用于執(zhí)行此操作。
從示例中看來,您需要使用該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 關(guān)注
- 149 瀏覽
添加回答
舉報
0/150
提交
取消