修复obs上传地址
Showing
4 changed files
with
11 additions
and
8 deletions
| ... | @@ -69,7 +69,7 @@ export const getUpFileSignByUrl = (params) => { | ... | @@ -69,7 +69,7 @@ export const getUpFileSignByUrl = (params) => { |
| 69 | }); | 69 | }); |
| 70 | }; | 70 | }; |
| 71 | 71 | ||
| 72 | function getPathUrl(url:string) { | 72 | export function getPathUrl(url:string) { |
| 73 | // 查找问号的位置 | 73 | // 查找问号的位置 |
| 74 | var questionMarkIndex = url.indexOf('?'); | 74 | var questionMarkIndex = url.indexOf('?'); |
| 75 | 75 | ||
| ... | @@ -80,7 +80,7 @@ function getPathUrl(url:string) { | ... | @@ -80,7 +80,7 @@ function getPathUrl(url:string) { |
| 80 | //obs上传 | 80 | //obs上传 |
| 81 | export const obsUploadRequest = (params) => { | 81 | export const obsUploadRequest = (params) => { |
| 82 | return request({ | 82 | return request({ |
| 83 | url: params.signedUrl && getPathUrl(params.signedUrl), | 83 | url: params.signedUrl, |
| 84 | withCredentials: false, | 84 | withCredentials: false, |
| 85 | headers: params.actualSignedRequestHeaders ? { | 85 | headers: params.actualSignedRequestHeaders ? { |
| 86 | "Content-Type": params.actualSignedRequestHeaders[ | 86 | "Content-Type": params.actualSignedRequestHeaders[ | ... | ... |
| ... | @@ -28,7 +28,8 @@ import { | ... | @@ -28,7 +28,8 @@ import { |
| 28 | getUpFileSignByUrl, | 28 | getUpFileSignByUrl, |
| 29 | obsUploadRequest, | 29 | obsUploadRequest, |
| 30 | getDownFileSignByUrl, | 30 | getDownFileSignByUrl, |
| 31 | obsDownloadRequest | 31 | obsDownloadRequest, |
| 32 | getPathUrl | ||
| 32 | } from "@/api/modules/obsService"; | 33 | } from "@/api/modules/obsService"; |
| 33 | import { Editor, EditorExpose } from '@/components/Editor' | 34 | import { Editor, EditorExpose } from '@/components/Editor' |
| 34 | 35 | ||
| ... | @@ -522,7 +523,7 @@ const uploadFile = (file, item) => { | ... | @@ -522,7 +523,7 @@ const uploadFile = (file, item) => { |
| 522 | actualSignedRequestHeaders: res.data.actualSignedRequestHeaders | 523 | actualSignedRequestHeaders: res.data.actualSignedRequestHeaders |
| 523 | }).then(() => { | 524 | }).then(() => { |
| 524 | if (res.code == '00000') { | 525 | if (res.code == '00000') { |
| 525 | file.file.url = res.data.signedUrl; | 526 | file.file.url = res.data.signedUrl && getPathUrl(res.data.signedUrl); |
| 526 | let fileItem = { | 527 | let fileItem = { |
| 527 | name: file.file.name, | 528 | name: file.file.name, |
| 528 | url: res.data.signedUrl, | 529 | url: res.data.signedUrl, | ... | ... |
| ... | @@ -25,7 +25,8 @@ import { | ... | @@ -25,7 +25,8 @@ import { |
| 25 | import { | 25 | import { |
| 26 | parseAndDecodeUrl, | 26 | parseAndDecodeUrl, |
| 27 | getUpFileSignByUrl, | 27 | getUpFileSignByUrl, |
| 28 | obsUploadRequest | 28 | obsUploadRequest, |
| 29 | getPathUrl | ||
| 29 | } from "@/api/modules/obsService"; | 30 | } from "@/api/modules/obsService"; |
| 30 | import { useRouter, useRoute } from "vue-router"; | 31 | import { useRouter, useRoute } from "vue-router"; |
| 31 | import useDataMetaStore from "@/store/modules/dataMeta" | 32 | import useDataMetaStore from "@/store/modules/dataMeta" |
| ... | @@ -873,7 +874,7 @@ const pageSave = () => { | ... | @@ -873,7 +874,7 @@ const pageSave = () => { |
| 873 | saveMetaReportAnalysis({ | 874 | saveMetaReportAnalysis({ |
| 874 | table: lastClickNode.value.tableName, | 875 | table: lastClickNode.value.tableName, |
| 875 | database: lastClickNode.value.databaseName, | 876 | database: lastClickNode.value.databaseName, |
| 876 | analysisReportUrl: res.data?.signedUrl, | 877 | analysisReportUrl: res.data?.signedUrl && getPathUrl(res.data?.signedUrl), |
| 877 | analysisReportName: analysisReportName, | 878 | analysisReportName: analysisReportName, |
| 878 | databaseChName: lastClickNode.value.databaseChName | 879 | databaseChName: lastClickNode.value.databaseChName |
| 879 | }).then((res: any) => { | 880 | }).then((res: any) => { | ... | ... |
| ... | @@ -31,7 +31,8 @@ import { TableColumnWidth } from '@/utils/enum'; | ... | @@ -31,7 +31,8 @@ import { TableColumnWidth } from '@/utils/enum'; |
| 31 | import { | 31 | import { |
| 32 | parseAndDecodeUrl, | 32 | parseAndDecodeUrl, |
| 33 | getUpFileSignByUrl, | 33 | getUpFileSignByUrl, |
| 34 | obsUploadRequest | 34 | obsUploadRequest, |
| 35 | getPathUrl | ||
| 35 | } from "@/api/modules/obsService"; | 36 | } from "@/api/modules/obsService"; |
| 36 | 37 | ||
| 37 | const { proxy } = getCurrentInstance() as any; | 38 | const { proxy } = getCurrentInstance() as any; |
| ... | @@ -573,7 +574,7 @@ const pageSave = () => { | ... | @@ -573,7 +574,7 @@ const pageSave = () => { |
| 573 | saveMetaReportAnalysis({ | 574 | saveMetaReportAnalysis({ |
| 574 | table: sheetInfo.value.tableName, | 575 | table: sheetInfo.value.tableName, |
| 575 | database: sheetInfo.value.databaseName, | 576 | database: sheetInfo.value.databaseName, |
| 576 | analysisReportUrl: res.data?.signedUrl, | 577 | analysisReportUrl: res.data?.signedUrl && getPathUrl(res.data?.signedUrl), |
| 577 | analysisReportName: analysisReportName, | 578 | analysisReportName: analysisReportName, |
| 578 | databaseChName: sheetInfo.value.databaseChName | 579 | databaseChName: sheetInfo.value.databaseChName |
| 579 | }).then((res: any) => { | 580 | }).then((res: any) => { | ... | ... |
-
Please register or sign in to post a comment