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.
22 lines
473 B
22 lines
473 B
package dao |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/library/database/bfs" |
|
"go-common/library/log" |
|
) |
|
|
|
// UploadBfs . |
|
func (d *Dao) UploadBfs(c context.Context, fileName string, bs []byte) (location string, err error) { |
|
if location, err = d.bfsCli.Upload(c, &bfs.Request{ |
|
Bucket: d.conf.Bfs.BucketSubtitle, |
|
Filename: fileName, |
|
ContentType: "application/json", |
|
File: bs, |
|
}); err != nil { |
|
log.Error("bfs.BfsDmUpload error(%v)", err) |
|
return |
|
} |
|
return |
|
}
|
|
|