fix: 接口变更/请求方法为大写
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
export function iperfV(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tool/iperf/v',
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
@@ -13,7 +13,7 @@ export function iperfV(data: Record<string, string>) {
|
||||
export function iperfI(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tool/iperf/i',
|
||||
method: 'post',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
export function listNeFiles(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/files',
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export function listNeFiles(query: Record<string, any>) {
|
||||
export function getNeFile(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/pullFile',
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
@@ -32,7 +32,7 @@ export function getNeFile(query: Record<string, any>) {
|
||||
export function getNeDirZip(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/pullDirZip',
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
@@ -43,7 +43,7 @@ export function getNeDirZip(data: Record<string, any>) {
|
||||
export function getNeViewFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/viewFile',
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
export function pingV(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tool/ping/v',
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user