Affects Version/s: None
Fix Version/s: None
Picking up on something that I discovered a while back.
This issue is created based on the conversations we had on this matter, plus my subsequent investigations.
The elaborate (and ancient) mail regarding this issue can be found here-
Basically, I was unable to store an image as a complex Obs using our trunk, as the image I was uploading was not getting detected.
I was able to recreate this in my local machine using tomcat and jetty, plus got Daniel Kaiyawa to also have a go, and he also reported that it will not work.
However, strangely, it does work on demo.openmrs.org.
I realized that this is most possibly because of a performance issue. Apparently the newly created complex obs is being validated before the image (or file) had finished uploading. I believe that this issue does not come up in the demo server or other actual implementations possibly because they live in their own dedicated machines, and are more powerful than mine.
However I think it's best if we fix this so that it will work on everyone's machines regardless of their performance
It is possible to fix this by changing the way validation is being done (instead of checking for obs.getValueComplex == null in the validator, we check the Multipart request in the controller class)
May I change it to that?
And also, another issue I discovered - (this exists in both the trunk and the demo server)-
Apparently you cannot edit a complex obs containing an image - it throws a terrible null pointer, even if you're not really changing any data.
Should I go ahead and fix both these issues ?