You are here

function s3fs_cors_upload_validate in S3 File System CORS Upload 7

Validation callback for s3fs_cors element type.

1 string reference to 's3fs_cors_upload_validate'
s3fs_cors_element_info in ./s3fs_cors.module
Implements hook_element_info().

File

./s3fs_cors.module, line 453
Allow uploading of files directly to AmazonS3 via the browser using CORS.

Code

function s3fs_cors_upload_validate(&$element, &$form_state) {
  file_managed_file_validate($element, $form_state);

  // Consolidate the array value of this field to a single FID.
  if (!$element['#extended']) {
    form_set_value($element, $element['fid']['#value'], $form_state);
  }
}