0

I got a site that uses php to access, upload, and delete images from a folder.

My question is, does php have issues doing this when multiple users are uploading, viewing, and deleting images all in the same folder at the same time?

Will it be ok just as long as I always check the image in question exists first?

So for example: One user might be uploading an image, While simultaneously another user might be deleting an image. Are there any conflicts here.

All images are uniquely named, and not connected to each other in any way outside the file.

I don't want to use a queue, that makes users wait until the other user is done doing their thing.

If php doesn't mind doing this, then what are the disadvantages, error and performance wise to making the files system like this. Besides the fact that is is disgustingly unorganized.

Can I get away with this as long as I have a lot of error checking?

seamus
  • 2,681
  • 7
  • 26
  • 49
  • You'll run into performance problems when listing more than a few thousand files in a folder; and, unless you put some level of security in place, user A will be able to delete user B's uploads – Mark Baker Jul 30 '13 at 21:53
  • 1
    You may find this useful - http://stackoverflow.com/questions/466521/how-many-files-in-a-directory-is-too-many – Jason McCreary Jul 30 '13 at 21:54

0 Answers0