Commit 11967203 by Li Feifei

debug

parent 4e53a3d7
Pipeline #15731 failed with stages
in 14 seconds
package model
import (
"github.com/gogf/gf/container/gset"
"ppt_server/app/model/internal"
)
......@@ -33,7 +32,7 @@ type (
Packed struct {
FileName string `json:"fileName"`
Hash string `json:"json"`
ImagesName *gset.Set `json:"imagesName"`
ImagesName []string `json:"imagesName"`
OssImagesPath string `json:"ossImagesPath"`
ImageInfos [][]interface{} `json:"imageInfos"`
}
......
......@@ -62,7 +62,6 @@ func Upload(r *model.FileUploadRequest, errChan chan error,
packed: &model.Packed{
FileName: f.filename(),
Hash: f.contentHash(),
ImagesName: gset.NewSet(),
OssImagesPath: f.splitUploadPath() + "images/",
},
n: newNotify(),
......@@ -168,7 +167,7 @@ func (f *ObtainFile) uploadPicture() error {
// 上传packed.json
func (f *ObtainFile) uploadPacked() error {
for i := 0; i <= f.pageCount; i++ {
f.packed.ImagesName.Add(fmt.Sprintf("%05d", i) +".png")
f.packed.ImagesName = append(f.packed.ImagesName, fmt.Sprintf("%05d", i) +".png")
}
packedBytes, _ := json.Marshal(f.packed)
return oss.Upload(f.parser.splitUploadPath()+"packed.json", bytes.NewReader(packedBytes))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment