我有一个FileUploader,当我尝试上传某些内容时,它正在工作,但是当我使用其他方式上传时,则不会触发。
当我调试FileUploader.js时,我发现问题不在上传中,而是在输入类型文件的FIleList中,没有正确填充。 它保持空值。
我的对象就是这样的视图:
<VBox>
<u:FileUploader id = "FilesUploaderFT"
name = "myFileUploadFT"
uploadUrl = "/sap/opu/odata/sap/ZFT_GW_FILE_MNGMT_SRV/FileMngmtSet"
uploadComplete = "uploaderUploadComplete"
change = "uploaderValueChange"
typeMissmatch = "uploaderTypeMissmatch"
style = "Emphasized"
valueState = "{UploadImage>/urlState}"
iconOnly = "true"
icon = "sap-icon://add"
fileType = "png,jpg,jpeg"
sendXHR = "true"
width = "150px"
visible = "{Edit>/EditOn}"
value = "{UploadImage>/URL}"
class = "sapUiTinyMarginBegin sapUiTinyMarginEnd"/>
<Input value = "{UploadImage>/description}"
visible = "{Edit>/EditOn}"
valueState = "{UploadImage>/descriptionSate}"
width = "150px"
class = "sapUiTinyMarginBegin sapUiTinyMarginEnd"/>
</VBox>
当我对变更事件进行调试时,fileList上没有值
uploaderValueChange: function (evt){
console.log(evt);
}
我在生产中使用SAPUI5 1.38。