mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
feat(cloud): 支持临时文件上传功能
- 使用 crypto 模块替换 md5 模块进行文件哈希计算 - 添加对临时文件上传的支持,当存在 tempFilePath 时使用文件流处理 - 实现临时文件的 MD5 计算和元数据解析功能 - 在上传完成后自动清理临时文件 - 配置服务器端文件上传中间件启用临时文件支持 - 修改上传插件以支持临时文件读取流上传方式 - 增加文件大小获取和验证的兼容性处理
This commit is contained in:
@@ -183,11 +183,12 @@ async function consturctServer(moduleDefs) {
|
||||
|
||||
app.use(fileUpload({
|
||||
limits: {
|
||||
fileSize: 500 * 1024 * 1024 // 500MB
|
||||
fileSize: 500 * 1024 * 1024
|
||||
},
|
||||
useTempFiles: false,
|
||||
tempFileDir: '/tmp/',
|
||||
abortOnLimit: true
|
||||
useTempFiles: true,
|
||||
tempFileDir: require('os').tmpdir(),
|
||||
abortOnLimit: true,
|
||||
parseNested: true
|
||||
}))
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user