fix: 接口变更/请求方法为大写

This commit is contained in:
TsMask
2025-02-20 10:42:34 +08:00
parent 8bfa73a67a
commit 7322759545
83 changed files with 568 additions and 1388 deletions

View File

@@ -15,7 +15,7 @@ import { encode } from 'js-base64';
export async function downloadFile(filePath: string, range?: string) {
return request({
url: `/file/download/${encode(filePath)}`,
method: 'get',
method: 'GET',
headers: range ? { range } : {},
responseType: 'blob',
timeout: 60_000,
@@ -77,7 +77,7 @@ export async function downloadFileChunk(
export function uploadFile(data: FormData) {
return request({
url: '/file/upload',
method: 'post',
method: 'POST',
data,
dataType: 'form-data',
timeout: 180_000,
@@ -169,7 +169,7 @@ export async function uploadFileChunk(
export function chunkCheck(identifier: string, fileName: string) {
return request({
url: '/file/chunkCheck',
method: 'post',
method: 'POST',
data: { identifier, fileName },
timeout: 60_000,
});
@@ -189,7 +189,7 @@ export function chunkMerge(
) {
return request({
url: '/file/chunkMerge',
method: 'post',
method: 'POST',
data: { identifier, fileName, subPath },
timeout: 60_000,
});
@@ -203,7 +203,7 @@ export function chunkMerge(
export function chunkUpload(data: FormData) {
return request({
url: '/file/chunkUpload',
method: 'post',
method: 'POST',
data,
dataType: 'form-data',
timeout: 60_000,
@@ -217,7 +217,7 @@ export function chunkUpload(data: FormData) {
export function transferStaticFile(data: Record<string, any>) {
return request({
url: `/file/transferStaticFile`,
method: 'post',
method: 'POST',
data,
timeout: 60_000,
});
@@ -241,7 +241,7 @@ export async function uploadFileToNE(
if (uploadChunkRes.code === RESULT_CODE_SUCCESS) {
const transferToNeFileRes = await request({
url: `/ne/action/pushFile`,
method: 'post',
method: 'POST',
data: {
uploadPath: uploadChunkRes.data.fileName,
neType,