fix: add status and created_at fields to file upload response#6094
Merged
vitormattos merged 4 commits intomainfrom Dec 11, 2025
Merged
fix: add status and created_at fields to file upload response#6094vitormattos merged 4 commits intomainfrom
vitormattos merged 4 commits intomainfrom
Conversation
Return status, statusText and created_at in the API response after file upload to display immediately in the files list without needing to reload. Also removed unused etag, path and type fields. Uses FileMapper to get status text and returns FileEntity directly from save() method instead of additional database query. Signed-off-by: Vitor Mattos <[email protected]>
Member
Author
|
/backport to stable32 |
Member
Author
|
/backport to stable31 |
Update psalm type to reflect the actual fields returned by the file upload endpoint: status, statusText, and created_at instead of etag, path, and type. Signed-off-by: Vitor Mattos <[email protected]>
Update OpenAPI spec and TypeScript types to reflect changes in LibresignNextcloudFile response type with status, statusText, and created_at fields. Signed-off-by: Vitor Mattos <[email protected]>
Add FileStatus backed enum to provide compile-time type safety for file status values. This replaces the previous int-based approach with a proper enum that: - Eliminates the need for default fallback in match expressions - Provides IDE autocomplete for all valid status values - Throws ValueError for invalid status codes instead of silently returning unknown status - Accepts both int and FileStatus for backward compatibility Updated getTextOfStatus() to use FileStatus enum with automatic conversion from int via FileStatus::from(). Removed null return type as status column is NOT NULL in database, ensuring statusText is always a string. This improves code maintainability and prevents invalid status values from being used throughout the codebase. Signed-off-by: Vitor Mattos <[email protected]>
This was referenced Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Return status, statusText and created_at in the API response after file upload to display immediately in the files list without needing to reload. Also removed unused etag, path and type fields.
Uses FileMapper to get status text and returns FileEntity directly from save() method instead of additional database query.