+
+
+
+ Requested ID ` + html.EscapeString(fileID) + ` not found in storage (404)
+
+ diff --git a/preview.go b/preview.go index ba9f76f..f10fe79 100644 --- a/preview.go +++ b/preview.go @@ -109,8 +109,27 @@ html, body { m, err := this.Metadata(fileID) if err != nil { if os.IsNotExist(err) { - http.Error(w, "Not found", 404) - return + + // If this is just one image out of many, show a 404 box and continue to show the other entries + // But if this is only a single image requested, abandon the whole pageload + + if len(fileIDs) == 1 { + http.Error(w, "Not found", 404) + return + } + + tmpl += ` +