Commit 2b6d5b1c by Li Feifei

test

parent 6dc10e56
Pipeline #14614 passed with stages
in 58 seconds
...@@ -24,7 +24,6 @@ import ( ...@@ -24,7 +24,6 @@ import (
"path" "path"
"ppt_server/models" "ppt_server/models"
"regexp" "regexp"
"runtime/debug"
"strconv" "strconv"
"strings" "strings"
"time" "time"
...@@ -505,16 +504,13 @@ func pdfThumbnail(objectPath string, file *zip.File, bucket *oss.Bucket) error { ...@@ -505,16 +504,13 @@ func pdfThumbnail(objectPath string, file *zip.File, bucket *oss.Bucket) error {
return errors.New("image ext is not found") return errors.New("image ext is not found")
} }
var buf bytes.Buffer var buf strings.Builder
if err = webp.Encode(&buf, img, &webp.Options{Lossless:true}); err != nil { if err = webp.Encode(&buf, img, &webp.Options{Lossless:true}); err != nil {
return err return err
} }
r := bytes.NewBufferString(buf.String())
r := bytes.NewReader(buf.Bytes())
buf.Reset()
debug.FreeOSMemory()
objectPathName := objectPath + "images/" objectPathName := objectPath + "images/"
......
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