Skip to content

Commit

Permalink
fix: Fix trailing slash in media urls returned from heresphere api (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoooi0 committed Jul 2, 2024
1 parent ff0ee48 commit a079b71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/api/heresphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (i HeresphereResource) getHeresphereFile(req *restful.Request, resp *restfu
Height: height,
Width: width,
Size: file.Size,
URL: fmt.Sprintf("%v://%v/api/dms/file/%v/%v", getProto(req), req.Request.Host, file.ID, dnt),
URL: fmt.Sprintf("%v://%v/api/dms/file/%v%v", getProto(req), req.Request.Host, file.ID, dnt),
},
},
})
Expand Down Expand Up @@ -344,7 +344,7 @@ func (i HeresphereResource) getHeresphereScene(req *restful.Request, resp *restf
Height: height,
Width: width,
Size: file.Size,
URL: fmt.Sprintf("%v://%v/api/dms/file/%v/%v", getProto(req), req.Request.Host, file.ID, dnt),
URL: fmt.Sprintf("%v://%v/api/dms/file/%v%v", getProto(req), req.Request.Host, file.ID, dnt),
},
},
}
Expand Down

0 comments on commit a079b71

Please sign in to comment.