imgme

Temporary image hosting for IRC
git clone https://git.woozle.org/neale/imgme.git

commit
f0b2292
parent
280284c
author
Neale Pickett
date
2024-01-26 15:27:07 -0700 MST
If exif tag removal fails, fall back to original image
1 files changed,  +3, -0
M cmd/imgme/main.go
+3, -0
 1@@ -76,6 +76,9 @@ func putImage(w http.ResponseWriter, r *http.Request) {
 2 		http.Error(w, err.Error(), http.StatusInternalServerError)
 3 		return
 4 	}
 5+	if len(filtered) == 0 {
 6+		filtered = buf
 7+	}
 8 	filename := fmt.Sprintf("%d.%d%s", time.Now().Unix(), rand.Int(), mimeType.Extension())
 9 	absFilename := path.Join(cacheDirectory, filename)
10 	os.WriteFile(absFilename, filtered, 0644)