feat: handle binary content

This commit is contained in:
Max Richter
2025-10-04 12:31:40 +02:00
parent ab81c980b5
commit 74528625e3
3 changed files with 8 additions and 10 deletions

View File

@@ -52,15 +52,7 @@ func (h *Handler) get(w http.ResponseWriter, target string) {
return
}
res := ResponseItem{
Name: fsEntry.File.Name,
Content: fsEntry.File.Content,
Type: fsEntry.File.Type,
IsDir: false,
Size: int64(len(fsEntry.File.Content)),
ModTime: fsEntry.File.ModTime,
}
writeJSON(w, 200, res)
writeFile(w, fsEntry.File)
return
}