in reply to Re: image upload size detection
in thread image upload size detection

I don't know how much usage you're going to be seeing (how many requests per sec, etc.), but based on the general information you've mentioned, I'd probably do the following:

  1. Keep the images in the filesystem
  2. Store the images in a series of hashed directories
  3. Maintain a table of where the locations of the files are and other metadata.
  4. Turn off .htaccess
  5. Turn off directory listings for the whole server.

.htaccess is useful for when there's distributed control of the system (different people control different directories), but it's an unnecessary overhead on a dedicated server. It's especially problematic for deep directory structures, which hashing would create.