forked from tcp.direct/tcp.ac
recognizes gifs now but 6MB gif up fails with no error????
This commit is contained in:
parent
874411e833
commit
5c43ec2fc8
|
@ -10,3 +10,8 @@
|
|||
2020/12/14 07:54:38 main.go:26: 127.0.0.1: 404
|
||||
2020/12/14 07:56:57 main.go:26: 127.0.0.1: 404
|
||||
2020/12/15 23:53:24 main.go:30: 127.0.0.1: 404
|
||||
2020/12/16 00:50:35 main.go:30: ::1: 400
|
||||
2020/12/16 00:50:49 main.go:30: ::1: 400
|
||||
2020/12/16 00:52:26 main.go:30: ::1: 400
|
||||
2020/12/16 00:55:58 main.go:31: 127.0.0.1: bad request
|
||||
2020/12/16 00:56:00 main.go:31: 127.0.0.1: bad request
|
||||
|
|
5
main.go
5
main.go
|
@ -8,8 +8,9 @@ import (
|
|||
"github.com/prologic/bitcask"
|
||||
"github.com/twharmon/gouid"
|
||||
"github.com/gin-gonic/gin"
|
||||
"io/ioutil"
|
||||
_ "image/gif"
|
||||
"crypto/md5"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"image"
|
||||
"bytes"
|
||||
|
@ -182,7 +183,7 @@ func init() {
|
|||
|
||||
/////////// init databases //////////
|
||||
opts := []bitcask.Option {
|
||||
bitcask.WithMaxValueSize(16 / 1024 / 1024),
|
||||
bitcask.WithMaxValueSize(24 / 1024 / 1024),
|
||||
}
|
||||
imgDB, _ = bitcask.Open("img.db", opts...)
|
||||
fmt.Println("Opening img.db")
|
||||
|
|
Loading…
Reference in New Issue