如何从Base64字符串设置Kendo Upload的初始文件。以下是我到目前为止的代码,
var imgBG = new Image();
imgBG.src = "data:image/jpg;base64,BASE64 String Here";
imgBG.name = "Current Background Image.jpg";
$("#files").kendoUpload({
select: imageValidationMessages,
async: {
saveUrl: "Save",
removeUrl: "Remove",
autoUpload: true
},
localization: {
select: 'Select Image',
remove: 'Remove Image',
cancel: 'Cancel'
},
multiple: false,
files:
[{
name: imgBG.name,
size: 2097152,
extension: ".jpg"
}]
});