You are here

function scald_audio_scald_add_form in Scald: Media Management made easy 7

Implements hook_scald_add_form().

File

modules/providers/scald_audio/scald_audio.module, line 24
Scald Audio is a Scald Atom Provider for audio files.

Code

function scald_audio_scald_add_form(&$form, &$form_state) {
  $defaults = scald_atom_defaults('audio');
  $type = scald_type_load('audio');
  $form['file'] = array(
    '#type' => $defaults->upload_type,
    '#title' => check_plain(scald_type_property_translate($type)),
    '#upload_location' => 'public://atoms/audio/',
    '#upload_validators' => array(
      'file_validate_extensions' => array(
        'wav ogg mp3',
      ),
    ),
  );
}