feat: enhance file handling with storage key management and retrieval…#74
Merged
jhonatapers merged 1 commit intodevelopfrom Aug 28, 2025
Merged
feat: enhance file handling with storage key management and retrieval…#74jhonatapers merged 1 commit intodevelopfrom
jhonatapers merged 1 commit intodevelopfrom
Conversation
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.
This pull request introduces significant changes to how file content is managed and retrieved in the application. The main update is the transition from using a file "location" string to a "storageKey" for identifying file content, and the adoption of streaming file content via
InputStreamrather than returning a location. This impacts the domain model, application use cases, service interfaces, and related tests. Additionally, the storage service interface is updated to support retrieving content streams, and a new exception is introduced for duplicate storage keys.Domain model and API changes:
Contentvalue object now usesstorageKeyinstead oflocation, and all validation, construction, and usage have been updated accordingly.GetFileContentOutputnow returns anInputStreamfor file content instead of a location string, reflecting a shift to direct streaming of file content.Application/service layer changes:
DefaultGetFileContentUseCaseand related logic now usestorageKeyand retrieve file content viaStorageService.retrieve, returning anInputStreamto the caller. [1] [2]StorageServiceinterface has been updated:storenow returns void and throws if the key exists,deleteandretrieveoperate onstorageKey.storageKey, retries if a key already exists (using the newStorageKeyAlreadyExistsException), and stores content under that key. [1] [2] [3]Testing and validation:
storageKeyinstead oflocation, and to verify streaming content viaInputStream. [1] [2] [3] [4] [5] [6]Infrastructure/API changes:
InputStreamResourceinstead ofFileSystemResourceto serve file content streams.Exception handling:
StorageKeyAlreadyExistsExceptionto handle rare key collisions when storing content.