Attachment location

Hello everyone,

I want to know that how and where attachments are stored in openmrs.

Is the whole attachment stored in the database or only attachment’s path is stored in the database ?

So in short i want to know that is attachment stored in database or in openmrs-core directory ?

1 Like

the image name is stored to the database and the image to the server,checkout

what is stored in the database ? Image name or Image path.

1 Like

its the name

ok so on which basis it fetches image from the server.

On the basis of Image name ?

1 Like

@pratikbiz24 the first things to know is that an attachment is just some kind of wrapper for a complex obs. Complex obs are saved by default in the OpenMRS app data dir inside the /complex_obs subfolder.

It is the value_complex field of the complex obs that holds parseable string data to its location.

There is no general rule as to what’s stored in the database within the obs’ value_complex (image name vs image path vs whatever other locator info), that depends on the complex obs handler defined for a given complex obs.


thanks @mksd

Thanks @mksd , Now i understood how it’s working :innocent:.