fix: 文件上传接口超时60s
This commit is contained in:
@@ -18,6 +18,7 @@ export async function downloadFile(filePath: string, range?: string) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
headers: range ? { range } : {},
|
headers: range ? { range } : {},
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +80,7 @@ export function uploadFile(data: FormData) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
dataType: 'form-data',
|
dataType: 'form-data',
|
||||||
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,6 +204,7 @@ export function chunkUpload(data: FormData) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
dataType: 'form-data',
|
dataType: 'form-data',
|
||||||
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +244,7 @@ export async function uploadFileToNE(
|
|||||||
neType,
|
neType,
|
||||||
neId,
|
neId,
|
||||||
},
|
},
|
||||||
timeout: 30_000,
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
return transferToNeFileRes;
|
return transferToNeFileRes;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user