- 七牛云资源添加前缀区分
This commit is contained in:
@@ -481,7 +481,7 @@ func (c *OrderManager) ExportOrders(ctx *jxcontext.Context, fromDateStr, toDateS
|
||||
keyPart = append(keyPart, toDateStr)
|
||||
}
|
||||
keyPart = append(keyPart, time.Now().Format("20060102T150405")+".xlsx")
|
||||
key := strings.Join(keyPart, "_")
|
||||
key := "export/" + strings.Join(keyPart, "_")
|
||||
formUploader := storage.NewFormUploader(cfg)
|
||||
ret := storage.PutRet{}
|
||||
for i := 0; i < 3; i++ {
|
||||
|
||||
@@ -61,7 +61,7 @@ func SendFilesToStores(ctx *jxcontext.Context, files []*multipart.FileHeader, ti
|
||||
globals.SugarLogger.Debugf("SendFilesToStores upload file:%s", fileHeader.Filename)
|
||||
if err == nil {
|
||||
ret := storage.PutRet{}
|
||||
key := "storeBill_" + utils.Int2Str(storeID) + "_" + strings.ToLower(utils.GetUUID()) + path.Ext(fileHeader.Filename)
|
||||
key := "storeBill/" + utils.Int2Str(storeID) + "_" + strings.ToLower(utils.GetUUID()) + path.Ext(fileHeader.Filename)
|
||||
formUploader := storage.NewFormUploader(cfg)
|
||||
for i := 0; i < 3; i++ {
|
||||
if err = formUploader.Put(context.Background(), &ret, upToken, key, file, fileHeader.Size, &storage.PutExtra{}); err == nil {
|
||||
|
||||
@@ -334,7 +334,7 @@ func DownloadFileByURL(fileURL string) (bodyData []byte, fileMD5 string, err err
|
||||
|
||||
/////
|
||||
func GenPicFileName(suffix string) string {
|
||||
return fmt.Sprintf("%x%s", md5.Sum([]byte(utils.GetUUID()+suffix)), suffix)
|
||||
return fmt.Sprintf("image/%x%s", md5.Sum([]byte(utils.GetUUID()+suffix)), suffix)
|
||||
}
|
||||
|
||||
func GuessVendorIDFromVendorStoreID(vendorStoreID int64) (vendorID int) {
|
||||
|
||||
Reference in New Issue
Block a user