syntax = "v1"

type (
	MediaUploadReq {
		// content: data URL (data:image/jpeg;base64,...) 或純 base64
		Content string `json:"content"`
		// kind: avatar | other（決定 object path 前綴）
		Kind string `json:"kind,optional"`
	}

	MediaUploadData {
		Url string `json:"url"`
		Key string `json:"key,optional"`
	}
)

@server (
	group:      media
	prefix:     /api/v1/media
	middleware: AuthJWT
)
service gateway {
	@handler Upload
	post /upload (MediaUploadReq) returns (MediaUploadData)
}
