fix: 文件下载接口无文件响应json
This commit is contained in:
@@ -177,13 +177,13 @@ func ReadUploadFileStream(filePath, headerRange string) (map[string]any, error)
|
||||
"range": "",
|
||||
"chunkSize": 0,
|
||||
"fileSize": 0,
|
||||
"data": nil,
|
||||
"data": []byte{},
|
||||
}
|
||||
|
||||
// 文件大小
|
||||
fileSize := getFileSize(fileAsbPath)
|
||||
if fileSize <= 0 {
|
||||
return result, nil
|
||||
return result, fmt.Errorf("file does not exist")
|
||||
}
|
||||
result["fileSize"] = fileSize
|
||||
|
||||
|
||||
Reference in New Issue
Block a user