Commit d23fda24 by Li Feifei

test

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