Merge branch 'develop' of git.ailuowan.com:zzw/lone-services into develop
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / analysis (push) Successful in 0s
CI / bff (push) Successful in 27s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 1s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 1s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 1s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / user (push) Successful in 0s
CI / task (push) Successful in 1s
CI / water (push) Successful in 25s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / analysis (push) Successful in 0s
CI / bff (push) Successful in 27s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 1s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 1s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 1s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / user (push) Successful in 0s
CI / task (push) Successful in 1s
CI / water (push) Successful in 25s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
This commit is contained in:
@@ -26,6 +26,7 @@ function _M.access(conf, ctx)
|
||||
["/api/v3/chore/answer/items"] = true,
|
||||
["/api/v3/chore/system/info"] = true,
|
||||
["/api/v3/chore/system/items"] = true,
|
||||
["/api/v3/chore/oss/signature"] = true,
|
||||
|
||||
["/api/v3/user/qrcode/generate"] = true,
|
||||
["/api/v3/user/qrcode/scan"] = true,
|
||||
|
||||
@@ -27,7 +27,7 @@ func (c *Client) SkinAnalyze(opts SkinAnalyzeOptions) (*SkinAnalyzeResponse, err
|
||||
case opts.ImageURL != "":
|
||||
values.Set("image_url", opts.ImageURL)
|
||||
default:
|
||||
return nil, errors.New("facepp: image_url, image_file or image_base64 is required")
|
||||
return nil, errors.New("facepp: image is required")
|
||||
}
|
||||
|
||||
applyOptionalParams(values, opts)
|
||||
|
||||
+4
-4
@@ -13,7 +13,7 @@ import (
|
||||
alioss "github.com/aliyun/aliyun-oss-go-sdk/oss"
|
||||
)
|
||||
|
||||
const MaxUploadBytes = 128 << 20 // 128MB
|
||||
const MaxUploadBytes = 128 << 20
|
||||
|
||||
var unsafeFileChars = regexp.MustCompile(`[^\w.\-\p{Han}]+`)
|
||||
|
||||
@@ -23,12 +23,12 @@ type Config struct {
|
||||
BucketName string
|
||||
Endpoint string
|
||||
Host string
|
||||
Dir string // 固定前缀,如 test/chore/files/
|
||||
Dir string
|
||||
}
|
||||
|
||||
type Result struct {
|
||||
URL string `json:"url"`
|
||||
Path string `json:"path"` // object key,如 test/chore/files/20260403/a.zip
|
||||
Path string `json:"path"`
|
||||
Host string `json:"host"`
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ type UploadInput struct {
|
||||
Filename string
|
||||
Content []byte
|
||||
ContentType string
|
||||
Dir string // 可选,覆盖配置 oss.dir
|
||||
Dir string
|
||||
}
|
||||
|
||||
func LoadConfig() Config {
|
||||
|
||||
@@ -64,9 +64,6 @@ func expandImageToTemp(srcPath string, ratio float64) (string, error) {
|
||||
|
||||
func saveFaceppTrainImage(srcPath string) (string, error) {
|
||||
saveDir := utils.GetConfigString("facepp.train_image_path")
|
||||
if saveDir == utils.StringEmpty {
|
||||
saveDir = "/data/facepp/train/images"
|
||||
}
|
||||
if err := os.MkdirAll(saveDir, os.ModePerm); err != nil {
|
||||
return utils.StringEmpty, err
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"lone-services/pkg/redis"
|
||||
"lone-services/pkg/utils"
|
||||
pkgws "lone-services/pkg/ws"
|
||||
"lone-services/rpc/percutaneous/pb"
|
||||
percutaneous "lone-services/rpc/percutaneous/pb"
|
||||
"lone-services/services/percutaneous/internal/dao"
|
||||
"lone-services/services/percutaneous/internal/svc"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user