You are here

function s3fs_cors_field_info_alter in S3 File System CORS Upload 8

Implements hook_field_info_alter().

Use a custom class to override the file field class by extending it to allow larger file sizes when the upload is to AWS S3. Images are not being treated similarly at this time.

File

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

Code

function s3fs_cors_field_info_alter(array &$info) {

  // Override the default file field class with a custom version.
  $info['file']['class'] = '\\Drupal\\s3fs_cors\\Plugin\\Field\\FieldType\\S3fsCorsFileItem';
}