-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12 Nov 2005, at 4:24 PM, Ber Kessels wrote:
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.
Create a proper 'file' form element that handles all the background stuff for you. And then a 'files' element for multiple files (ala upload) You could add an extra couple of variable to their defaults .. ie : function system_elements() { $info['file'] = array('#domain' => 'node', '#dest' => variable_get ('files_dir', ''), '#key' => $node->nid) return $info; } This would make it absolutely braindead easy to upload a file. you just add a file element in it, and you'd use either one of the common domains, or create your own. (ie: image, user, node) - -- Adrian Rossouw Drupal developer and Bryght Guy http://drupal.org | http://bryght.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFDdi+bgegMqdGlkasRAvIiAKCVeWkyVw1LppTbsoWSkODM4vkiiwCghmfM EWjGxGiIw0ulJKnOmbJQx/0= =yEQU -----END PGP SIGNATURE-----