protected function FileUpload::getMaxUploadSize in GraphQL 8.4
Gets max upload size.
Parameters
array $settings: The file field settings.
Return value
int Max upload size.
1 call to FileUpload::getMaxUploadSize()
- FileUpload::saveFileUpload in src/
GraphQL/ Utility/ FileUpload.php - Validates an uploaded file, saves it and returns a file upload response.
File
- src/
GraphQL/ Utility/ FileUpload.php, line 133
Class
- FileUpload
- Service to manage file uploads within GraphQL mutations.
Namespace
Drupal\graphql\GraphQL\UtilityCode
protected function getMaxUploadSize(array $settings) {
// Cap the upload size according to the PHP limit.
$max_filesize = Bytes::toInt(Environment::getUploadMaxSize());
if (!empty($settings['max_filesize'])) {
$max_filesize = min($max_filesize, Bytes::toInt($settings['max_filesize']));
}
return $max_filesize;
}