- revert to correct excel ext in SendFilesToStores.

This commit is contained in:
gazebo
2018-11-01 07:54:00 +08:00
parent 1ad4df80d2
commit 3b1256876c

View File

@@ -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()