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:
@@ -329,6 +329,9 @@ func DecorateFile(boxID string, file models.BoxFile) models.BoxFile {
|
||||
}
|
||||
|
||||
file.IconPath = IconForMimeType(file.MimeType, file.Name)
|
||||
if file.ThumbnailPath != nil {
|
||||
file.ThumbnailURL = *file.ThumbnailPath
|
||||
}
|
||||
file.DownloadPath = "/box/" + boxID + "/files/" + url.PathEscape(file.Name)
|
||||
file.UploadPath = "/box/" + boxID + "/files/" + url.PathEscape(file.ID) + "/upload"
|
||||
file.IsComplete = file.Status == models.FileStatusReady
|
||||
|
||||
Reference in New Issue
Block a user