function s3fs_cors_menu in S3 File System CORS Upload 7
Implements hook_menu().
File
- ./
s3fs_cors.module, line 10 - Allow uploading of files directly to AmazonS3 via the browser using CORS.
Code
function s3fs_cors_menu() {
$items = array();
$items['ajax/s3fs_cors'] = array(
'title' => 'S3 Request Signature Callback',
'page callback' => 's3fs_cors_sign_request',
// TODO: Add a permission for this? Or at least restrict to logged-in users.
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$items['admin/config/media/s3fs/cors'] = array(
'title' => 'CORS Upload',
'description' => 'Configure S3 File System CORS Upload.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
's3fs_cors_admin_form',
),
'access arguments' => array(
'administer s3fs CORS',
),
'file' => 's3fs_cors.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 20,
);
return $items;
}