feat: add thumbnail metadata and download endpoint

- Extend `BoxFile` with thumbnail path/status fields and internal URL
- Populate `ThumbnailURL` when a thumbnail path is present during decoration
- Add `/box/:id/thumbnails/:file_id` route and handler to serve JPEG thumbnails
- Introduce thumbnail status constants to standardize processing state reportingfeat: add thumbnail metadata and download endpoint

- Extend `BoxFile` with thumbnail path/status fields and internal URL
- Populate `ThumbnailURL` when a thumbnail path is present during decoration
- Add `/box/:id/thumbnails/:file_id` route and handler to serve JPEG thumbnails
- Introduce thumbnail status constants to standardize processing state reporting
This commit is contained in:
2026-04-28 18:44:16 +03:00
parent c1489d1fbb
commit f1600faa8d
12 changed files with 400 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ type Handlers struct {
BoxStatus gin.HandlerFunc
DownloadBox gin.HandlerFunc
DownloadFile gin.HandlerFunc
DownloadThumbnail gin.HandlerFunc
CreateBox gin.HandlerFunc
ManifestFileUpload gin.HandlerFunc
FileStatusUpdate gin.HandlerFunc
@@ -25,6 +26,7 @@ func Register(router *gin.Engine, handlers Handlers) {
router.GET("/box/:id/status", handlers.BoxStatus)
router.GET("/box/:id/download", handlers.DownloadBox)
router.GET("/box/:id/files/:filename", handlers.DownloadFile)
router.GET("/box/:id/thumbnails/:file_id", handlers.DownloadThumbnail)
router.POST("/box", handlers.CreateBox)
router.POST("/box/:id/login", handlers.BoxLoginPost)