You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cloud_upload.go 632 B

3 päivää sitten
2 päivää sitten
3 päivää sitten
3 päivää sitten
3 päivää sitten
3 päivää sitten
3 päivää sitten
1234567891011121314151617181920212223
  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. }