提交代码
This commit is contained in:
parent
ccb2d52094
commit
6fc0b8d11d
|
|
@ -37,6 +37,9 @@ const downloadFileChunk = (fileUrl, chunkIndex, startByte, endByte) => {
|
||||||
responseType: 'blob', // 以 Blob 类型的响应返回数据
|
responseType: 'blob', // 以 Blob 类型的响应返回数据
|
||||||
timeout: 600000, // 设置超时时间为 10 秒(10000 毫秒)
|
timeout: 600000, // 设置超时时间为 10 秒(10000 毫秒)
|
||||||
headers: {
|
headers: {
|
||||||
|
encryptRequest :false,
|
||||||
|
checkIntegrity :false,
|
||||||
|
encryptResponse: false,
|
||||||
'Range': `bytes=${startByte}-${endByte}`, // 定义请求的字节范围
|
'Range': `bytes=${startByte}-${endByte}`, // 定义请求的字节范围
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ export default {
|
||||||
this.uploadChunks(nextFile);
|
this.uploadChunks(nextFile);
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
const maxSize = 2 * 1024 * 1024*1024; // 限制文件最大为 5MB
|
const maxSize = 10 * 1024 * 1024*1024; // 限制文件最大为 5MB
|
||||||
if (file.size > maxSize) {
|
if (file.size > maxSize) {
|
||||||
this.$message.error('文件大小不能超过 2GB');
|
this.$message.error('文件大小不能超过 2GB');
|
||||||
return false; // 阻止上传
|
return false; // 阻止上传
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue