Based on user request a temporary image file is supposed to be created on Apache's end. The file shall remain as long as user's session is maintained. Which is best was yo expose the location of this file, considering security reasons. Should it be inside /var/www/html/ or an alternate location
migrated from stackoverflow.com Aug 1 '09 at 14:53
This question came from our site for professional and enthusiast programmers.
You could put it in a nonbrowsable directory with some sort of generated (hash?) filename, and the filename would be only visible to the user. This way you can store all kinds of images in one directory (easy maintenance), but without people being able to peek on one another. And with a hash long enough (SHA-512 anyone?) the chance of anyone 'guessing' a filename would be astronomically small.