-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
If externalizing binary content is configured, uploading same binary content several times results in new version of DocumentReference, new binary to be re-uploaded. Submitting same binary should be a no-op.
To Reproduce
- Register BinaryStorageInterceptor via InterceptorService, register BinaryAccessProvider, DatabaseBinaryContentStorageSvcImpl beans in jpa server context.
(set MinimumBinarySize for DatabaseBinaryContentStorageSvcImpl to 1000) - Create DocumentReference for Patient
Request Example:
POST {FHIR_ENDPOINT_URL}/DocumentReference
{
"resourceType": "DocumentReference",
"subject": {
"reference": "Patient/1702"
},
"content": [
{
"attachment": {
"contentType": "image/jpeg"
}
}
]
}
- execute $binary-access-write operation with attached file(any file with size over 1000 bytes):
POST /DocumentReference/1703/$binary-access-write?path=DocumentReference.content.attachment
- execute save $binary-access-write operation again or update DocumentReference resource with PUT operation and same attached binary.
Expected behaviour
Uploading same binary file again should not create new version of DocumentReference, new binary should not be re-uploaded by IBinaryStorageSvc
Actual behaviour
Uploading same binary file again creates new version of DocumentReference, new binary is re-uploaded by IBinaryStorageSvc
Metadata
Metadata
Assignees
Labels
No labels