On Thu, 10 Nov 2005 22:18:44 -0500 James Walker <walkah@walkah.net> wrote:
I won't go so far as to say maybe upload.module should do something similar... ;)
I like this. It sounds like a much better solution then what upload has now. Now, in my world, I dont have that much trouble with dangling images due to peoples ugly operating systems crashing (or ppl closing the browsers). I /do/ have a lot of trouble with GD and or imagemagic crashing (mostly because morons cannot understand the difference between a 20Meg image and a 500k one!). One of my reasons for starting this general upload stuff, is to be able to handle these kind of problems in a central place. My plan in my new system is to uplaod the image, and even insert it in the table. if its there, if it has a uid/nid/wid (whateverid) it is finished, finito. even if a browser crashes: its there. files without an id are indeed orphans (like walkahs images in /tmp) as are files that were processed, but not yet inserted in that table. A cron can then delete all non-wid files from the table AND the FS. And a cron can delete all files from the FS that are not in the databasetable. Ber