Need for Postgresql Database photo storage

How to use Wappler to store photo image as bytea type in PostgreSQL database.
This is a needed Wappler feature.
Wappler can only store photo image as a file and not in the database table.
Storing application photo in the database instead of the operating system file, is more secure and makes it easy to backup or replicate the photos when the database is copied or replicated.

Oliver,

I have been there and done that. Please do not ignore this warning like I did many moons ago.

Do not store images in a database.

It will not only slow the database down, it will also slow down the rendering of the page.

The best (only) way is to upload the image file and have a pointer in the database.

5 Likes

Wappler lacks this feature on purpose as it’s a very bad practice.

2 Likes

It depends of the size of the image being stored and the security need to have the photo secured with user details. It also depends on how your database handles the operation. There is no bad feature, what may be the use case. There is no one size fits all.

Oliver

If you are concerned about the security, your files can be securely stored and protected on the server as well…

Having the feature does not require everybody to use it. The feature is there in other Web App development packages. It will only enrich Wappler.

1 Like

We have had numerous discussions before about storing images in database.

It is Bad practice particularly for the web because you can’t use any browser and web server caching to retrieve the images.

Your database have to be queried again and again for each image and won’t be able to take advantage of the web server high performance file optimizations.

So this will add a huge load to your database server just to handle simple things like file storage that are being handled much better by the native file system and web servers.

2 Likes
1 Like