提交 d35c5f78 编写于 作者: Cano1997's avatar Cano1997

update: 文件下载路径调整

上级 deaf58dd
......@@ -167,7 +167,6 @@ export function useIViewUpload(
// 下载文件
const onDownload = (file: IData) => {
// const url = file.url || downloadUrl.value.replace('%fileId%', file.id);
const ctrl =
(c.parent as FormItemController).form ||
(c.parent as GridEditItemController).grid;
......@@ -175,8 +174,13 @@ export function useIViewUpload(
const base64 = `${file.id}|${entityName}|${props.data.srfkey}|${
c.context.srfpersonid || c.context.srfuserid
}`;
const url = `http://downloadpath?key=${window.btoa(base64)}`;
c.fileDownload({ url, name: file.name });
const url = file.url || downloadUrl.value.replace('%fileId%', file.id);
c.fileDownload({
url: `${url}?key=${window.btoa(base64)}${Math.floor(
1000 + Math.random() * 9000,
)}`,
name: file.name,
});
};
return {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册