Add last modified tracking: show 'Last modified: date by username' in document viewer

- Added modified_by column to files table
- Updated WOPI PutFile to track who modified the file
- Updated view handlers to return file metadata (name, size, lastModified, modifiedByName)
- Updated Flutter models and UI to display last modified info
This commit is contained in:
Leon Bösche
2026-01-13 16:45:57 +01:00
parent 6943e95479
commit 6ce43a3c9b
9 changed files with 134 additions and 318 deletions

View File

@@ -512,7 +512,7 @@ func wopiPutFileHandler(w http.ResponseWriter, r *http.Request, db *database.DB,
// Update file size and modification time in database
newSize := int64(len(content))
err = db.UpdateFileSize(r.Context(), fileUUID, newSize)
err = db.UpdateFileSize(r.Context(), fileUUID, newSize, &userID)
if err != nil {
fmt.Printf("[WOPI-STORAGE] Failed to update file size: file=%s error=%v\n", fileID, err)
// Don't fail the upload, just log the warning