You are here

function s3fs_cors_upload_js in S3 File System CORS Upload 7

1 string reference to 's3fs_cors_upload_js'
s3fs_cors_upload_process in ./s3fs_cors.module
Element process function for s3fs_cors_upload element.

File

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

Code

function s3fs_cors_upload_js($form, &$form_state) {

  // Find the element that triggered the AJAX callback and return it so that it
  // can be replaced.
  $parents = $form_state['triggering_element']['#array_parents'];
  $button_key = array_pop($parents);
  $element = drupal_array_get_nested_value($form, $parents);
  return $element;
}