nidus-sync/rmo/image.go
Eli Ribble e7681c7d6e
Change public-report to rmo
We're leaning into the branding and shorter directory names
2026-01-29 23:59:35 +00:00

18 lines
410 B
Go

package rmo
import (
"net/http"
"github.com/Gleipnir-Technology/nidus-sync/userfile"
"github.com/go-chi/chi/v5"
)
// ServeImageByUUID reads an image with the given UUID from disk and writes it to the HTTP response
func getImageByUUID(w http.ResponseWriter, r *http.Request) {
uid := chi.URLParam(r, "uuid")
if uid == "" {
http.NotFound(w, r)
return
}
userfile.PublicImageFileToResponse(w, uid)
}