From 5c43ec2fc8acf776882dedd0178a37fcd9ec9137 Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Wed, 16 Dec 2020 01:05:52 -0800 Subject: [PATCH] recognizes gifs now but 6MB gif up fails with no error???? --- error.log | 5 +++++ main.go | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/error.log b/error.log index 63f0535..9054407 100644 --- a/error.log +++ b/error.log @@ -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 diff --git a/main.go b/main.go index b6fd5b0..7106240 100644 --- a/main.go +++ b/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")