mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Fix image convert (#185)
This commit is contained in:
@@ -268,8 +268,11 @@ func (e *Image) Convert(ctx context.Context, req *img.ConvertRequest, rsp *img.C
|
||||
}
|
||||
rsp.Url = fmt.Sprintf("%v/%v/%v/%v/%v", e.hostPrefix, "micro", "images", tenantID, req.Name)
|
||||
} else {
|
||||
dst := []byte{}
|
||||
base64.StdEncoding.Encode(dst, buf.Bytes())
|
||||
src := buf.Bytes()
|
||||
length := base64.StdEncoding.EncodedLen(len(src))
|
||||
dst := make([]byte, length)
|
||||
base64.StdEncoding.Encode(dst, src)
|
||||
|
||||
rsp.Base64 = string(dst)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user