diff --git a/business/jxstore/financial/financial.go b/business/jxstore/financial/financial.go index c86bead89..e8ed85628 100644 --- a/business/jxstore/financial/financial.go +++ b/business/jxstore/financial/financial.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "mime/multipart" + "path" "strings" "time" @@ -59,7 +60,7 @@ func SendFilesToStores(ctx *jxcontext.Context, files []*multipart.FileHeader, is globals.SugarLogger.Debugf("SendFilesToStores upload file:%s", fileHeader.Filename) if err == nil { ret := storage.PutRet{} - key := "storeBill_" + utils.Int2Str(storeID) + "_" + strings.ToLower(utils.GetUUID()) + ".lsx" //path.Ext(fileHeader.Filename) + key := "storeBill_" + utils.Int2Str(storeID) + "_" + strings.ToLower(utils.GetUUID()) + path.Ext(fileHeader.Filename) formUploader := storage.NewFormUploader(cfg) err = formUploader.Put(context.Background(), &ret, upToken, key, file, fileHeader.Size, nil) file.Close()