我使用基于ubuntu的集成文档服务器4.4.3,下面的代码是为我的适用性定制的,我如何根据键形成一个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/.....
});
};
Run Code Online (Sandbox Code Playgroud)
先感谢您
小智 4
您尝试过早获取链接,文件尚不可用,转换过程可能未完成。该回调仅表示转换任务创建完成
但是您可以尝试使用函数 onDownloadAs (为要创建外部按钮 downloadAs 的集成商创建) http://api.onlyoffice.com/editors/config/events#onDownloadAs 文件的链接将发送到:asc_docs_api .prototype.processSavedFile = 函数(url, downloadType)
| 归档时间: |
|
| 查看次数: |
262 次 |
| 最近记录: |