Documents in DB

Hi again. I see that Openboxes saves files in the “documents” table through a mediumblob type field, in our experience, saving files in MySQL causes performance problems in the long run. Is there any other way to save and reference documents?

Yes, that’s a very good point. And yes at some point I am hoping to build out a few options so that we can make this configurable. Unfortunately, I don’t have capacity or funding for this in the short-term but if someone was interested in sponsoring this development, then I’d be happy to lay the groundwork for how I’d like to architect it.

I see our approach being similar to Django’s File Storage API
https://docs.djangoproject.com/en/3.2/ref/files/storage/

And then we’ll build a few useful storage mechanisms, including: AWS S3 and Azure Files, database and filesystem for backwards-compability, as well as others.
https://django-storages.readthedocs.io/en/latest/index.html

I suspect that getting the AWS S3 implementation working would be a priority but I’m open to suggestions.

Justin

1 Like