airajena opened a new pull request, #5496:
URL: https://github.com/apache/fineract/pull/5496
## Description
Fixes profile image path collision between Client and Staff entities when
they share the same numeric ID.
Previously, image save operations always used the `images/clients/{id}`
path, even for Staff uploads. This caused Staff and Client images with the same
ID to overwrite/read from the same location.
## Changes
- Updated `ContentRepository` image save method signatures to include
`entityName`.
- Updated image write flow in `ImageWritePlatformServiceJpaRepositoryImpl`
to pass the entity type (`clients` or `staff`) to the content repository.
- Updated `FileSystemContentRepository` image path generation to use:
- `images/clients/{id}` for clients
- `images/staff/{id}` for staff
- Updated `S3ContentRepository` image path generation with the same
entity-specific behavior.
## Testing
- Ran targeted compile checks:
- `./gradlew :fineract-document:compileJava :fineract-provider:compileJava`
- Ran targeted static analysis:
- `./gradlew :fineract-document:spotbugsMain
:fineract-provider:spotbugsMain :fineract-document:spotbugsTest
:fineract-provider:spotbugsTest`
- module-wide `spotless/checkstyle` currently reports pre-existing
formatting/line-ending issues in unrelated files in this environment.
## Related Issue
- FINERACT-1878 - Profile Image sharing between Client and Staff
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]