diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 1c8705f35..814146244 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -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++ { diff --git a/business/jxstore/financial/financial.go b/business/jxstore/financial/financial.go index 60cfce180..e4a4a3fa2 100644 --- a/business/jxstore/financial/financial.go +++ b/business/jxstore/financial/financial.go @@ -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 { diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index 47105d484..8ffc4eaeb 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -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) {