I'm working on this project of movie database, I made database of the movie details(Name, Rating... etc) But now I need to save the Image in somewhere I saved it in a folder but if the user is not a developer how can he access the folder? Or is there any way for me to save the Images on a database? Flask uses SQLAlchemy and you can't save images in it and if you can it's not that good. If my question is not clear please let me know.
1 Answer
There are a couple of good answers on this post which deals with a similar issue.
Correct way to declare an image field, sqlalchemy
To summarise, either use the SQLAlchemy-ImageAttach library, or have an "image field" on the model, which is actually just a String URL to where the image is saved.
3 Comments
Arya Kurdo
I know I have seen that question but I really don't get that image-attach thing I read the documentations too but still nothing XD maybe I'm just dumb
snailor
Have you tried the other answer, which is the string url field on the model, where you simply link the image url, without using the module?
Arya Kurdo
Thanks for the help I trully appreciate it I will do that