'Best method of storing images in a flask application
How to upload picture in flask application
I'm working in a flask application, I want to upload picture and store in database. What is the best way of storing files in database(path with images)? Is uploading images via ajax is a best way.
Solution 1:[1]
I find it depens on how many images you have, if that a lot I would prefer storing the image path to database. You have a smaller database footprint, and you dont need to write functions to store and load them from database.
how you upload this images is up to you, if you use just jinja with raw html forms then use regular forms, if you are using js frameworks like vue or angular then go with ajax.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Christoph |
