How to upload multiple files and predefine filetypes? Does someone know how it is possible to upload multiple files with the dropbox client module for drupal 7?

It would be nice if it could be integrated with plupload.

Also i would like to know how i can predefine the filetypes users can upload?

I'm a n00b in php, can someone give me some tips or solutions?

Here is the part of the upload funktion in the dropbox client module.

function dropbox_client_upload_form( $form, &amp;$form_state ) {

  $form[ 'upload' ] = array(
    '#title' =&gt; t('Upload file'),
    '#type' =&gt; 'file',
    '#size' =&gt; 20,
    );
  $form[ 'submit' ] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t( 'Upload' ),
    );
  return $form;
}

function dropbox_client_upload_form_submit( $form, &amp;$form_state ) {

  global $user;

  $dropbox = dropbox_client_get_client();

  //Process files
  $uploads_dir = dirname( $_FILES[ 'files' ][ "tmp_name" ][ 'upload' ] );

  $tmp_name = $_FILES[ 'files' ][ "tmp_name" ][ 'upload' ];
  $name = $_FILES[ 'files' ][ "name" ][ 'upload' ];
  $filename = "$uploads_dir/$name";
  move_uploaded_file( $tmp_name, $filename );

  $dpath = (isset( $_GET[ 'dpath' ] )) ? $_GET[ 'dpath' ] : '/';
  $result = $dropbox-&gt;add( $dpath, $filename );

  if ( property_exists( $result, 'error' ) ) {
    drupal_set_message( $result-&gt;error );
  }
  else {
    drupal_goto( $_GET['q'], array( 'query' =&gt; array( 'dpath' =&gt; $dpath ) ) );
  }
}


Thank you!

Best regards,
meckl
Also i would like to know how i can predefine the filetypes users can
  upload?


Specify the file types restriction on the file field with 'file_validate_extensions' in the #upload_validators array in the file field.
See the form api for reference. See the file_managed field.