[development] Files on previews

Ber Kessels ber at webschuur.com
Sat Nov 12 18:58:12 UTC 2005


Hmm,

> 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)

I absolutely do not understand what you are talking about. It probably is because i don't understand the formAPI completely. Yet. But I think you misunderstood my code/plans for the file system :) 
Till now, I did not use the form api niftyness in my file system, so I am very happy if someone could give a hand there, and reduce some of my code/hooks by using that niftyness!

Ber


More information about the development mailing list