Rest Resource for Complex Observation

Hi All, I am creating a complex obs using rest resource.

 {
        	"encounterDatetime": "2017-09-05T14:36:00.268+0100",
        	"encounterType": "5021b1a1-e7f6-44b4-ba02-da2f2bcf8718",
        	"patient": "4de79064-e5e8-460d-97f9-2d336a8cc7eb",
        	"visit": "bab174f0-fcf2-4c2d-a272-f803ff841b10",
        	"location": "2131aff8-2e2a-480a-b7ab-4ac53250262b",
        	"obs": [{
        			"obsDatetime": "2017-09-05T14:36:00.268+0100",
        			"concept": "42ed45fd-f3f6-44b6-bfc2-8bde1bb41e00",
        			"comment": "sky",
        			"person": "4de79064-e5e8-460d-97f9-2d336a8cc7eb",
        			"name": "complexDataFile",
        			"filename": "mathematics.jpg",
        			"value": "Base64 byteArray..."
        	}]
        }

It is creating a raw file with extension .raw. But when I create a complex obs here, it is saving with actual file extension(.png in my case). Is there any way I can save original file extension in server. If not how can how can I retrieve original file information to save actual file back in client computer.

regards

Which openmrs platform and module versions are you using?

@dkayiwa Hi Daniel, I am using reference application 2.6.0.

And which exact REST url are you posting to?

Any solution to this issue? We are facing the same issue. @dkayiwa @jaks80