Answer the question
In order to leave comments, you need to log in
How to restrict access to a file by a direct link?
Firework!
Flask has a site site.ru , and there is a static folder, it contains img/ userid in which there are already user pictures.
So, if you know the userid, and the name of the picture, then you can even see it for an unauthorized user at site.ru/img/userid/img.jpg ,
as well as with any other files in other folders in static.
I have two solutions, but they are some kind of crutches:
1)добавить между img и userid , какую нибудь папку типа "09410fd6-e764-4c6a-a9e1"
2)отдавать браузеру картинку в base64, но это не решить проблему с файлами
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question