I somehow doubt anyone here'll know, but I'm thinking about advanced-ish file upload systems.
My point is, when storing a file it presents obvious problems to just upload it. Normally we rename it to stop scripts running and so on. I want to create a script that handles the uploads in a way that seems to the user that no change whatsoever has happened to the file.
I'm assuming I could do this by visiting a downloading script, which reads the file byte by byte and sends each to the browser - but I'm thinking this will inevitably lead to errors, probably script timeouts, and if done incorrectly memory overloads.
So I guess my question is - is there a better way to do this? is the feeding it through a running php script a terrible idea? is there some simple way to make a folder 'safe' to upload and download any kind of file to using .htaccess?
Also, and hints or tips on ways of doing image previews of multiple sizes would be appreciated. I'm assuming the best way is by using the GD library to create them, and store them in a folder with a size limit, deleting the oldest ones when necessary - so images could be cached by browsers without having to modify headers, but it doesn't take insane amounts of space.