fix(brand): 品牌检测源文件改走 OSS URL(服务端化跨节点组装可用)
前端上传桥与降级桥透传 uploadOss;品牌页提交时 fileUrl 优先取上传响应的 OSS url,localPath 仅作旧桌面桥兜底。
This commit is contained in:
@@ -286,7 +286,7 @@ async function uploadBrandPathsToJava(paths: Array<string | BrandExpandFolderIte
|
||||
for (const item of paths) {
|
||||
const filePath = typeof item === 'string' ? item : item.absolutePath
|
||||
const relativePath = typeof item === 'string' ? undefined : item.relativePath
|
||||
const uploaded = await api.upload_file_to_java(filePath, relativePath)
|
||||
const uploaded = await api.upload_file_to_java(filePath, relativePath, true)
|
||||
if (!uploaded?.success || !uploaded.data) {
|
||||
throw new Error(uploaded?.error || uploaded?.message || `上传失败:${filePath}`)
|
||||
}
|
||||
@@ -356,12 +356,13 @@ async function submitRun() {
|
||||
}
|
||||
submitting.value = true
|
||||
try {
|
||||
// 上传后以服务器可读的 localPath 作为 fileUrl(Java resolveSourceFile 直接读临时文件)
|
||||
// 上传后以可跨节点下载的源地址作为 fileUrl:优先 OSS url(uploadToOss=true 的桌面桥),
|
||||
// 旧桌面桥只回 localPath(Java 容器临时路径,双活组装可能读不到),作为兜底仍透传。
|
||||
const files: UploadedFileRef[] = uploadedFiles.value.map((f) => ({
|
||||
fileKey: f.fileKey,
|
||||
originalFilename: f.originalFilename,
|
||||
relativePath: f.relativePath,
|
||||
fileUrl: f.localPath,
|
||||
fileUrl: f.url || f.localPath,
|
||||
}))
|
||||
if (runMode.value === 'immediate') {
|
||||
const res = await runBrandNow(files, strategy.value)
|
||||
|
||||
Reference in New Issue
Block a user