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.
 
 
 

21 lines
422 B

package dao
import (
"context"
"go-common/library/database/bfs"
"go-common/library/log"
)
// Upload .
func (d *Dao) Upload(c context.Context, bucket, fileName, contentType string, file []byte) (err error) {
if _, err = d.bfsCli.Upload(c, &bfs.Request{
Bucket: bucket,
ContentType: contentType,
Filename: fileName,
File: file,
}); err != nil {
log.Error("Upload(err:%v)", err)
}
return
}