c9a5eab1 by lihua

修复obs上传地址

1 parent f5a2ac31
......@@ -69,7 +69,7 @@ export const getUpFileSignByUrl = (params) => {
});
};
function getPathUrl(url:string) {
export function getPathUrl(url:string) {
// 查找问号的位置
var questionMarkIndex = url.indexOf('?');
......@@ -80,7 +80,7 @@ function getPathUrl(url:string) {
//obs上传
export const obsUploadRequest = (params) => {
return request({
url: params.signedUrl && getPathUrl(params.signedUrl),
url: params.signedUrl,
withCredentials: false,
headers: params.actualSignedRequestHeaders ? {
"Content-Type": params.actualSignedRequestHeaders[
......
......@@ -28,7 +28,8 @@ import {
getUpFileSignByUrl,
obsUploadRequest,
getDownFileSignByUrl,
obsDownloadRequest
obsDownloadRequest,
getPathUrl
} from "@/api/modules/obsService";
import { Editor, EditorExpose } from '@/components/Editor'
......@@ -522,7 +523,7 @@ const uploadFile = (file, item) => {
actualSignedRequestHeaders: res.data.actualSignedRequestHeaders
}).then(() => {
if (res.code == '00000') {
file.file.url = res.data.signedUrl;
file.file.url = res.data.signedUrl && getPathUrl(res.data.signedUrl);
let fileItem = {
name: file.file.name,
url: res.data.signedUrl,
......
......@@ -25,7 +25,8 @@ import {
import {
parseAndDecodeUrl,
getUpFileSignByUrl,
obsUploadRequest
obsUploadRequest,
getPathUrl
} from "@/api/modules/obsService";
import { useRouter, useRoute } from "vue-router";
import useDataMetaStore from "@/store/modules/dataMeta"
......@@ -873,7 +874,7 @@ const pageSave = () => {
saveMetaReportAnalysis({
table: lastClickNode.value.tableName,
database: lastClickNode.value.databaseName,
analysisReportUrl: res.data?.signedUrl,
analysisReportUrl: res.data?.signedUrl && getPathUrl(res.data?.signedUrl),
analysisReportName: analysisReportName,
databaseChName: lastClickNode.value.databaseChName
}).then((res: any) => {
......
......@@ -31,7 +31,8 @@ import { TableColumnWidth } from '@/utils/enum';
import {
parseAndDecodeUrl,
getUpFileSignByUrl,
obsUploadRequest
obsUploadRequest,
getPathUrl
} from "@/api/modules/obsService";
const { proxy } = getCurrentInstance() as any;
......@@ -573,7 +574,7 @@ const pageSave = () => {
saveMetaReportAnalysis({
table: sheetInfo.value.tableName,
database: sheetInfo.value.databaseName,
analysisReportUrl: res.data?.signedUrl,
analysisReportUrl: res.data?.signedUrl && getPathUrl(res.data?.signedUrl),
analysisReportName: analysisReportName,
databaseChName: sheetInfo.value.databaseChName
}).then((res: any) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!