|
楼主 |
发表于 2020-2-11 13:31:39
|
显示全部楼层
哦,看到了:
Model.prototype.modelModelConstructDone = function(event) {
var self = this;
self.uploader = new Uploader(this.getElementByXid('uploadBtn'));
var docNodeTree = this.comp('docNodeTree');
self.uploader.on('onStart', function(data) {
var docPath = DocUtils.InnerUtils.getDocFullPath(docNodeTree.getCurrentRowID(), docNodeTree.getValue("sDocPath"));
var actionUrl = DocUtils.InnerUtils.getdocServerAction({
"docPath" : docPath,
urlPattern : "/repository/file/cache/upload",
isFormAction : true,
context : self.getContext()
});
self.uploader.actionUrl = actionUrl;
});
self.uploader.on('onSuccess', function(data, fileName) {
// data.response 为 ResponseXML
var file = $(data.response).find("file");
var kind = $(file).attr("mediatype");
var cacheName = $(file).attr("file-name");
var size = $(file).attr("fileSize");
self.upload(fileName, kind, size, cacheName);
});
this.docNodeTreeIndexChanged();
};
好了, 结贴吧
|
|