feat: OnlyOffice Document Server Integration + Preview ohne neuen Tab

OnlyOffice Integration:
- DOCX, XLSX, PPTX nativ im Browser bearbeiten (wie Google Docs)
- Automatische Erkennung: Wenn OnlyOffice konfiguriert ist, wird der
  vollwertige Editor geladen, sonst die einfache Vorschau als Fallback
- Backend: WOPI-aehnliche Endpunkte
  - GET /files/<id>/onlyoffice-config - Editor-Konfiguration
  - POST /files/onlyoffice-callback - Speicher-Callback von OnlyOffice
  - GET /files/onlyoffice-status - Verfuegbarkeits-Check
- JWT-Signierung fuer sichere Kommunikation mit OnlyOffice
- Dokument-Key basiert auf file_id + checksum (Cache-Invalidierung)

Admin-Einstellungen:
- OnlyOffice URL + JWT Secret konfigurierbar
- Setup-Anleitung direkt in der UI (docker-compose auskommentieren)

docker-compose.yml:
- OnlyOffice Document Server als optionaler Service (auskommentiert)
- Einfach auskommentieren fuer volle Office-Bearbeitung

Preview:
- Oeffnet sich jetzt innerhalb der App (kein neuer Tab)
- Zurueck-Button in der Toolbar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Hacker
2026-04-11 21:19:17 +02:00
parent a2ded7f97c
commit 216445d41b
6 changed files with 260 additions and 44 deletions
+18
View File
@@ -12,4 +12,22 @@ services:
- UPLOAD_PATH=/app/data/files
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:5000}
- MAX_UPLOAD_SIZE_MB=${MAX_UPLOAD_SIZE_MB:-500}
- ONLYOFFICE_URL=${ONLYOFFICE_URL:-}
restart: unless-stopped
# Optional: OnlyOffice Document Server fuer Office-Bearbeitung
# Auskommentieren um DOCX/XLSX/PPTX bearbeiten zu koennen
# Nach dem Start die ONLYOFFICE_URL in den Admin-Einstellungen setzen
# oder als Umgebungsvariable: ONLYOFFICE_URL=http://onlyoffice
#
# onlyoffice:
# image: onlyoffice/documentserver:latest
# ports:
# - "8080:80"
# environment:
# - JWT_ENABLED=true
# - JWT_SECRET=${ONLYOFFICE_JWT_SECRET:-minicloud-onlyoffice-secret}
# volumes:
# - ./data/onlyoffice/logs:/var/log/onlyoffice
# - ./data/onlyoffice/data:/var/www/onlyoffice/Data
# restart: unless-stopped