nidus-sync/rmo/image.go

19 lines
410 B
Go
Raw Normal View History

package rmo
2026-01-21 18:26:48 +00:00
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)
}