preserve image extension
Ted Unangst tedu@tedunangst.com
Wed, 18 Sep 2019 15:34:29 -0400
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
activity.go
→
activity.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