|
- package app
-
- import (
- "context"
- svc "egg-im/internal/business/comm/service"
- "fmt"
- )
-
- type cloudUpload struct{}
-
- var CloudUpload = new(cloudUpload)
-
- // FileReqUpload 请求文件上传
- func (*cloudUpload) FileReqUpload(ctx context.Context, uid, dirName, fName string, fSize int64) (interface{}, error) {
-
- callbackUrl := svc.SysCfgGet("cloud_file_upload_call_back_url")
- fileBucketHost := svc.SysCfgGet("file_bucket_host")
- fileBucketScheme := svc.SysCfgGet("file_bucket_scheme")
-
- callbackUrl = fmt.Sprintf(callbackUrl, fileBucketHost, fileBucketScheme)
-
- return svc.FileReqUpload(ctx, uid, dirName, fName, callbackUrl, fSize)
- }
|