Need advice on best practice for controlling access to user content
Hi,
I am working on a website (apache server, using PHP for backend) that lets users upload images. I want that only the user who uploaded the images can see them (so someone who gets a link to the uploaded image will not be able to view them). What is the best way to do so?
the option i've thought of was to upload images outside of the /www scope and serve them using php while checking for auth.
Is there a better/easier solution? something on the server level?