Images are theeeeeeere!

19 Feb 2018

This is a quick update on the status of LSBEngine as it is late in the night but I finally implemented the image upload feature!

I have been thinking about this for quite some time as the way to upload and store images on a server is apparently not something everybody agrees on. Some people would just store it in their database directly. This is a solution I was not too fond of when I first thought of it as binary data in a database seemed wrong (especially since in most relational databases, there is no good type support for it). Digging a bit deeper I realised that thid was not as clear cut as I expected (see this quora question for example) and it turns out that MongoDB has some support for storing files! They call it GridFs and it looked promising but I wanted my NginX reverse-proxy to be able to serve the files by itselg which looked impractical.

In the end, after much thinking anf not a lot of doing, I simply decided I would store those files on the file system and index them in the database. It turns out that the solution is quite elegant, solves all my problems and needs and gives easier backup options.

To conclude, I'd like to remind you that you can find the full description of the project here and finally, here is the first image I wanted to upload to this blog: First Image!