I am trying to allow a user to upload multiple .pdf documents. I'm unable to figure out how the upload module works, and so I'm trying a new solution. Here's the code that I have for my form

$form['file1'] = array(
    '#type' => 'file',
      '#title' => t('attach your files here'),
);  
$form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Upload Pdf'),
);

I now need to know how I can actually upload this to the server. Is it in the formname_submit hook or is there some other way to do this?

Comments

bwv’s picture

You could use the WebFM module for file management (uploading, downloading, etc.). Don't know if it will suit your exact needs, however.
----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.

----------------------------------------------------------------------
http://classicvinyl.com

VM’s picture

I'd use CCK.module with the filefield.module addon to have my own upload pdf content type.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )