You are here

public function PluploadWidgetTrait::getMaxFileSize in PlUPload File Widget 8

Returns the maximum configured file size for the Field stroage in Bytes.

Return value

double|int

2 calls to PluploadWidgetTrait::getMaxFileSize()
FileWidget::form in src/Plugin/Field/FieldWidget/FileWidget.php
Creates a form element for a field.
ImageWidget::form in src/Plugin/Field/FieldWidget/ImageWidget.php
Creates a form element for a field.

File

src/Plugin/Field/FieldWidget/PluploadWidgetTrait.php, line 44

Class

PluploadWidgetTrait

Namespace

Drupal\plupload_widget\Plugin\Field\FieldWidget

Code

public function getMaxFileSize() {

  // We don't care about PHP's max post
  // or upload file size because we use
  // plupload.
  $size = $this
    ->getFieldSetting('max_filesize');
  $size = Bytes::toInt($size);
  return $size;
}