No description
Find a file
2026-06-07 15:55:19 +02:00
public initial commit 2026-06-07 15:46:44 +02:00
.gitignore initial commit 2026-06-07 15:46:44 +02:00
files.json update files 2026-06-07 15:55:19 +02:00
go.mod initial commit 2026-06-07 15:46:44 +02:00
go.sum initial commit 2026-06-07 15:46:44 +02:00
LICENSE Initial commit 2026-06-01 18:54:27 +00:00
README.md initial commit 2026-06-07 15:46:44 +02:00
server.go update port 2026-06-07 15:48:38 +02:00
test.png initial commit 2026-06-07 15:46:44 +02:00

cdn-jmse-cloud

Simple Gin server with an image route group.

files.json format

{
  "files": {
	"items": [
	  {
		"slug": "test123",
		"path": "test.png",
		"type": "image/png"
	  }
	]
  }
}

GET /images/:slug looks up files.items[].slug and serves the matching file.

The server also accepts GET /image/:slug as a compatibility alias. If the URL includes an extension (for example /image/avatar-2024-modified.png), the extension is stripped before slug matching.

Run

go test ./...
go run .