diff --git a/backend/workers/thumbnails.go b/backend/workers/thumbnails.go index 838db8e..c114044 100644 --- a/backend/workers/thumbnails.go +++ b/backend/workers/thumbnails.go @@ -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) diff --git a/frontend/src/components/ThumbnailImage.tsx b/frontend/src/components/ThumbnailImage.tsx index 0cf9cd5..8276e9e 100644 --- a/frontend/src/components/ThumbnailImage.tsx +++ b/frontend/src/components/ThumbnailImage.tsx @@ -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) {