自定义函数组成url根据key下载文件

custom function to form a url to download a document based on key

我正在使用基于集成文档服务器 4.4.3 ubuntu,下面的代码是根据我的适用性定制的,我如何根据键

形成 url
asc_docs_api.prototype.asc_customCallback     = function(typeFile, bIsDownloadEvent)
{

    var actionType =  c_oAscAsyncAction.DownloadAs;
    var options    = {downloadType : DownloadType.Download };
    this._downloadAs("save", typeFile, actionType, options, function(incomeObject){
    if (null != incomeObject && "save" == incomeObject["type"]) {

           //incomeObject["data"]  will return key of the document instead of key, i need full url of the document with md5 and expires like below 

           //ex: http://cache/files/.....


    });
};

提前致谢

您试图过早获取 link,该文件尚不可用,转换过程可能未完成。 这个回调只代表创建了转换任务

但您可以尝试使用函数 onDownloadAs(为要创建外部按钮 downloadAs 的集成商创建) http://api.onlyoffice.com/editors/config/events#onDownloadAs 文件的 link 将发送至: asc_docs_api.prototype.processSavedFile = 函数(url, 下载类型)