Protect image path in Flask API
Set an owner_ID to each link entry in DB.
Than you can selecet the link by link_id and owner_ID.
If the curr user not the user of the directory you can return a permission_denied(403)
Im making a web application using flask api. When a user is created, a folder is created for them on the file system. They use this for uploading their own images. When uploding the image path is stored in the db. My problem is that this image path should only be allowed for that specific user. The paths gets returned by the api, but If known everyone can request the image src. How can i restrict that to the owner only?