From 841b395dc05ec577d4dad32f1cd1ab8610160c2c Mon Sep 17 00:00:00 2001 From: FeiyueHa <31588734+feiyueha@users.noreply.github.com> Date: Sat, 22 Jun 2024 14:31:02 +0000 Subject: [PATCH] Fix aliyun oss 502 callback failed. --- pkg/filesystem/driver/oss/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/filesystem/driver/oss/handler.go b/pkg/filesystem/driver/oss/handler.go index 2ae50a375e..019188e0a4 100644 --- a/pkg/filesystem/driver/oss/handler.go +++ b/pkg/filesystem/driver/oss/handler.go @@ -420,7 +420,7 @@ func (handler *Driver) Token(ctx context.Context, ttl int64, uploadSession *seri // 回调策略 callbackPolicy := CallbackPolicy{ - CallbackURL: apiURL.String(), + CallbackURL: strings.Replace(apiURL.String(), "https://", "http://", 1), CallbackBody: `{"name":${x:fname},"source_name":${object},"size":${size},"pic_info":"${imageInfo.width},${imageInfo.height}"}`, CallbackBodyType: "application/json", }