| | |
| | | import ( |
| | | "basic.com/fileserver/WeedFSClient.git" |
| | | uuid "github.com/satori/go.uuid" |
| | | "strconv" |
| | | "time" |
| | | "wms/conf" |
| | | "wms/pkg/logx" |
| | |
| | | |
| | | func UploadFileToSeaWeed(fileType, ext string, fileBytes []byte) (string, error) { |
| | | //assignUrl := conf.WebConf.FileServer + "/dir/assign?collection=" + time.Now().Format("2006-01-02 15:04:05")[:10] + "-" + conf.WebConf.ServerId + "-" + fileType |
| | | assignUrl := conf.WebConf.FileServer + "/dir/assign?collection=" + strconv.FormatInt(time.Now().Unix(), 10) + "-" + conf.WebConf.ServerId + "-" + fileType |
| | | assignUrl := conf.WebConf.FileServer + "/dir/assign?collection=12345-" + conf.WebConf.ServerId + "-" + fileType |
| | | |
| | | picUrl, err := WeedFSClient.GetFid(assignUrl) |
| | | if err != nil { |