fix: 修改上传接口返回字段名为fileName
This commit is contained in:
@@ -490,7 +490,7 @@ func (s *FileController) Upload2(c *gin.Context) {
|
|||||||
newFileName := upFilePath[strings.LastIndex(upFilePath, "/")+1:]
|
newFileName := upFilePath[strings.LastIndex(upFilePath, "/")+1:]
|
||||||
c.JSON(200, result.OkData(map[string]string{
|
c.JSON(200, result.OkData(map[string]string{
|
||||||
"url": "//" + c.Request.Host + upFilePath,
|
"url": "//" + c.Request.Host + upFilePath,
|
||||||
"filePath": upFilePath,
|
"fileName": upFilePath,
|
||||||
"newFileName": newFileName,
|
"newFileName": newFileName,
|
||||||
"originalFileName": formFile.Filename,
|
"originalFileName": formFile.Filename,
|
||||||
}))
|
}))
|
||||||
@@ -575,7 +575,7 @@ func (s *FileController) ChunkMerge2(c *gin.Context) {
|
|||||||
newFileName := mergeFilePath[strings.LastIndex(mergeFilePath, "/")+1:]
|
newFileName := mergeFilePath[strings.LastIndex(mergeFilePath, "/")+1:]
|
||||||
c.JSON(200, result.OkData(map[string]string{
|
c.JSON(200, result.OkData(map[string]string{
|
||||||
"url": "//" + c.Request.Host + mergeFilePath,
|
"url": "//" + c.Request.Host + mergeFilePath,
|
||||||
"filePath": mergeFilePath,
|
"fileName": mergeFilePath,
|
||||||
"newFileName": newFileName,
|
"newFileName": newFileName,
|
||||||
"originalFileName": body.FileName,
|
"originalFileName": body.FileName,
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user