2022-05-23 05:05:59 +00:00
|
|
|
"use strict";
|
|
|
|
exports.__esModule = true;
|
2022-06-04 09:01:33 +00:00
|
|
|
exports.FILE_CHUNK_SIZE = exports.FileApiDefinition = void 0;
|
2022-05-23 05:05:59 +00:00
|
|
|
exports.FileApiDefinition = {
|
|
|
|
/**
|
|
|
|
* 上传文件
|
|
|
|
*/
|
|
|
|
upload: {
|
2022-05-23 08:20:56 +00:00
|
|
|
method: 'post',
|
2022-05-23 05:05:59 +00:00
|
|
|
server: 'upload',
|
|
|
|
client: function () { return '/file/upload'; }
|
2022-06-04 09:01:33 +00:00
|
|
|
},
|
2022-06-04 19:14:47 +00:00
|
|
|
/**
|
2022-06-23 09:55:22 +00:00
|
|
|
* 初始分块上传
|
2022-06-04 19:14:47 +00:00
|
|
|
*/
|
|
|
|
initChunk: {
|
|
|
|
method: 'post',
|
|
|
|
server: 'upload/initChunk',
|
|
|
|
client: function () { return '/file/upload/initChunk'; }
|
|
|
|
},
|
2022-06-04 09:01:33 +00:00
|
|
|
/**
|
|
|
|
* 上传分块文件
|
|
|
|
*/
|
|
|
|
uploadChunk: {
|
|
|
|
method: 'post',
|
|
|
|
server: 'upload/chunk',
|
|
|
|
client: function () { return '/file/upload/chunk'; }
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 上传分块文件
|
|
|
|
*/
|
|
|
|
mergeChunk: {
|
|
|
|
method: 'post',
|
|
|
|
server: 'merge/chunk',
|
|
|
|
client: function () { return '/file/merge/chunk'; }
|
2024-09-10 05:18:56 +00:00
|
|
|
},
|
|
|
|
ossSign:{
|
|
|
|
method: "post",
|
|
|
|
server: "upload/ossSign",
|
|
|
|
client: function () { return '/file/upload/ossSign'; }
|
|
|
|
},
|
|
|
|
ossChunk:{
|
|
|
|
method: "post",
|
|
|
|
server: "upload/ossChunk",
|
|
|
|
client: function () { return '/file/upload/ossChunk'; }
|
|
|
|
},
|
|
|
|
ossMerge:{
|
|
|
|
method: "post",
|
|
|
|
server: "upload/ossMerge",
|
|
|
|
client: function () { return '/file/upload/ossMerge'; }
|
|
|
|
},
|
2022-05-23 05:05:59 +00:00
|
|
|
};
|
2024-09-09 06:39:50 +00:00
|
|
|
// 设置文件分片的大小 改成 8 M
|
|
|
|
// MINIO 等oss 有最小分片的限制
|
|
|
|
exports.FILE_CHUNK_SIZE = 8 * 1024 * 1024;
|