lifan_main
发布于

上传图片出现错误

WARN] 2021/08/03 16:59 Recovered from a route's Handler('iris/hero.makeHandler.func2')
POST /api/upload HTTP/1.1
Host: 127.0.0.1:8082
Connection: close
Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.5
Connection: close
Content-Length: 10535
Content-Type: multipart/form-data; boundary=---------------------------119809521514081598531354346318
Cookie: Hm_lvt_79b8ff82974d0769ef5c629e4cd46629=1627966215; __gads=ID=25d9f649a6f61cf8-228b8766a1ca0023:T=1627966217:RT=1627966217:S=ALNI_MYbVxvdlkuFSWJv4wAaJfLiIfJxUQ; Hm_lpvt_79b8ff82974d0769ef5c629e4cd46629=1627980484; userToken=ff06273baca049f3a0859f68a765fcb2
Referer: http://zill.cc/topic/create
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
X-Client: bbs-go-site
X-User-Token: ff06273baca049f3a0859f68a765fcb2

runtime error: slice bounds out of range [:-1]
/usr/local/go/src/runtime/panic.go:965
/usr/local/go/src/runtime/panic.go:98
/root/Downloads/golang/bbs-go/server/pkg/urls/urls.go:75
/root/Downloads/golang/bbs-go/server/pkg/uploader/aliyun_oss_uploader.go:39
/root/Downloads/golang/bbs-go/server/pkg/uploader/aliyun_oss_uploader.go:26
/root/Downloads/golang/bbs-go/server/pkg/uploader/uploader.go:27
/root/Downloads/golang/bbs-go/server/controllers/api/upload_controller.go:46
/usr/local/go/src/reflect/value.go:476
/usr/local/go/src/reflect/value.go:337
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/hero/handler.go:157
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/context/context.go:611
/root/gocode/pkg/mod/github.com/iris-contrib/middleware/cors@v0.0.0-20200913183508-5d1bed0e6ea4/cors.go:189
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/context/context.go:611
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/middleware/logger/logger.go:73
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/context/context.go:611
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/middleware/recover/recover.go:77
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/context/context.go:476
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/core/router/handler.go:440
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/core/router/router.go:219
/root/gocode/pkg/mod/github.com/kataras/iris/v12@v12.2.0-alpha2/core/router/router.go:319
/usr/local/go/src/net/http/server.go:2867
/usr/local/go/src/net/http/server.go:1932
/usr/local/go/src/runtime/asm_amd64.s:1371

time="2021-08-03T17:00:07+08:00" level=info msg="上传文件:characters.png size:12754"

评论(1)
  • lifan_main
    lifan_main 回复

    上传 png 图片出现错误, 前端没有响应