Fix: thumbnail rendering aspect ratios and spreadsheet layouts
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m20s

This commit is contained in:
Elijah 2026-05-25 14:56:53 -07:00
parent 8995b48eb5
commit a87bb351d0
2 changed files with 13 additions and 1 deletions

View file

@ -161,6 +161,18 @@ func generateOfficeThumbnail(filePath, destPath string, cfg *config.Config) erro
"outputtype": "jpg",
"title": "preview.jpg",
"url": fileUrl,
"thumbnail": map[string]interface{}{
"aspect": 0,
"first": true,
"width": 1024,
"height": 1024,
},
"spreadsheetLayout": map[string]interface{}{
"ignorePrintArea": true,
"printGridlines": true,
"printHeadings": true,
"fitToWidth": 1,
},
}
payloadBytes, err := json.Marshal(payload)

View file

@ -18,7 +18,7 @@ export default function ThumbnailImage({ checksum, fallbackIcon, downloadToken }
key={key}
src={downloadToken ? `${api.getThumbnailUrl(checksum, downloadToken)}${errorCount > 0 ? `&t=${key}` : ''}` : ''}
alt=""
className="w-full h-full object-cover"
className="w-full h-full object-contain"
style={{ display: showFallback ? 'none' : 'block' }}
onError={(e) => {
if (errorCount < 5) {