all repos — honk @ 299fda8807ff83789b617d37131f2a3c443e023b

my fork of honk

preserve image extension
Ted Unangst tedu@tedunangst.com
Wed, 18 Sep 2019 15:34:29 -0400
commit

299fda8807ff83789b617d37131f2a3c443e023b

parent

3511a286639147c47cd82a535d105ad6dd9d16e1

1 files changed, 6 insertions(+), 1 deletions(-)

jump to
M activity.goactivity.go

@@ -165,7 +165,12 @@ data = []byte{}

goto saveit } data = img.Data - media = "image/" + img.Format + format := img.Format + media = "image/" + format + if format == "jpeg" { + format = "jpg" + } + xid = xid + "." + format } else if len(data) > 100000 { log.Printf("not saving large attachment") localize = false