function FileUploadResource::getBaseRouteRequirements
Same name in other branches
- 8.9.x core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::getBaseRouteRequirements()
- 10 core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::getBaseRouteRequirements()
- 11.x core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::getBaseRouteRequirements()
Overrides ResourceBase::getBaseRouteRequirements
1 call to FileUploadResource::getBaseRouteRequirements()
- FileUploadResource::getBaseRoute in core/
modules/ file/ src/ Plugin/ rest/ resource/ FileUploadResource.php - Gets the base route for a particular method.
File
-
core/
modules/ file/ src/ Plugin/ rest/ resource/ FileUploadResource.php, line 592
Class
- FileUploadResource
- File upload resource.
Namespace
Drupal\file\Plugin\rest\resourceCode
protected function getBaseRouteRequirements($method) {
$requirements = parent::getBaseRouteRequirements($method);
// Add the content type format access check. This will enforce that all
// incoming requests can only use the 'application/octet-stream'
// Content-Type header.
$requirements['_content_type_format'] = 'bin';
return $requirements;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.