Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

24 rindas
632 B

  1. package app
  2. import (
  3. "context"
  4. svc "egg-im/internal/business/comm/service"
  5. "fmt"
  6. )
  7. type cloudUpload struct{}
  8. var CloudUpload = new(cloudUpload)
  9. // FileReqUpload 请求文件上传
  10. func (*cloudUpload) FileReqUpload(ctx context.Context, uid, dirName, fName string, fSize int64) (interface{}, error) {
  11. callbackUrl := svc.SysCfgGet("cloud_file_upload_call_back_url")
  12. fileBucketHost := svc.SysCfgGet("file_bucket_host")
  13. fileBucketScheme := svc.SysCfgGet("file_bucket_scheme")
  14. callbackUrl = fmt.Sprintf(callbackUrl, fileBucketHost, fileBucketScheme)
  15. return svc.FileReqUpload(ctx, uid, dirName, fName, callbackUrl, fSize)
  16. }