From 626823b4b5f51b88314fea01825baaeec1a0026f Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Wed, 7 Feb 2024 13:13:57 +0800 Subject: [PATCH] Revert "fix(upload): fix upload url for relationship blocks" This reverts commit bb83face082fe26286a71d634fb709027d8c9c93. --- .../client/src/schema-component/antd/upload/shared.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/upload/shared.ts b/packages/core/client/src/schema-component/antd/upload/shared.ts index d2fd7edec9..ab89c50403 100644 --- a/packages/core/client/src/schema-component/antd/upload/shared.ts +++ b/packages/core/client/src/schema-component/antd/upload/shared.ts @@ -5,7 +5,6 @@ import { isArr, isValid, toArr as toArray } from '@formily/shared'; import { UploadFile } from 'antd/es/upload/interface'; import { useEffect } from 'react'; import { useAPIClient } from '../../../api-client'; -import { useBlockRequestContext, useSourceIdFromParentRecord } from '../../../block-provider/BlockProvider'; import { UPLOAD_PLACEHOLDER } from './placeholder'; import type { IUploadProps, UploadProps } from './type'; @@ -172,8 +171,6 @@ export function useUploadProps({ serviceEr }; const api = useAPIClient(); - const { props: blockProps } = useBlockRequestContext(); - const sourceId = useSourceIdFromParentRecord(); return { ...props, @@ -188,11 +185,6 @@ export function useUploadProps({ serviceEr }); } formData.append(filename, file); - - if (blockProps?.association) { - action = `${blockProps?.association.split('.')[0]}/${sourceId}/${action}`; - } - // eslint-disable-next-line promise/catch-or-return api.axios .post(action, formData, {