feat: update getDownloadSourceFile to include document_name parameter for file export
--bug=1058717 --user=刘瑞斌 【共享资源】知识库-下载原文档-报错 https://www.tapd.cn/62980211/s/1730722
This commit is contained in:
parent
9fc20ca53f
commit
939da5b94b
@ -126,11 +126,12 @@ const putCancelTask: (
|
|||||||
* 下载原文档
|
* 下载原文档
|
||||||
* @param 参数 knowledge_id
|
* @param 参数 knowledge_id
|
||||||
*/
|
*/
|
||||||
const getDownloadSourceFile: (knowledge_id: string, document_id: string) => Promise<Result<any>> = (
|
const getDownloadSourceFile: (knowledge_id: string, document_id: string, document_name: string) => Promise<Result<any>> = (
|
||||||
knowledge_id,
|
knowledge_id,
|
||||||
document_id,
|
document_id,
|
||||||
|
document_name
|
||||||
) => {
|
) => {
|
||||||
return get(`${prefix}/${knowledge_id}/document/${document_id}/download_source_file`)
|
return exportFile(document_name, `${prefix}/${knowledge_id}/document/${document_id}/download_source_file`, {}, undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -126,11 +126,12 @@ const putCancelTask: (
|
|||||||
* 下载原文档
|
* 下载原文档
|
||||||
* @param 参数 knowledge_id
|
* @param 参数 knowledge_id
|
||||||
*/
|
*/
|
||||||
const getDownloadSourceFile: (knowledge_id: string, document_id: string) => Promise<Result<any>> = (
|
const getDownloadSourceFile: (knowledge_id: string, document_id: string, document_name: string) => Promise<Result<any>> = (
|
||||||
knowledge_id,
|
knowledge_id,
|
||||||
document_id,
|
document_id,
|
||||||
|
document_name
|
||||||
) => {
|
) => {
|
||||||
return get(`${prefix}/${knowledge_id}/document/${document_id}/download_source_file`)
|
return exportFile(document_name, `${prefix}/${knowledge_id}/document/${document_id}/download_source_file`, {}, undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user