mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-02 16:15:59 +08:00
s3 presigned test
This commit is contained in:
@@ -55,6 +55,13 @@ func (o *ThirdApi) AccessURL(c *gin.Context) {
|
||||
|
||||
func (o *ThirdApi) ObjectRedirect(c *gin.Context) {
|
||||
name := c.Param("name")
|
||||
if name == "" {
|
||||
c.String(http.StatusBadRequest, "name is empty")
|
||||
return
|
||||
}
|
||||
if name[0] == '/' {
|
||||
name = name[1:]
|
||||
}
|
||||
operationID := c.Query("operationID")
|
||||
if operationID == "" {
|
||||
operationID = strconv.Itoa(rand.Int())
|
||||
|
||||
Reference in New Issue
Block a user