function FileUploadResource::getBaseRouteRequirements
Same name in other branches
- 9 core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::getBaseRouteRequirements()
- 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()
Overrides ResourceBase::getBaseRouteRequirements
1 call to FileUploadResource::getBaseRouteRequirements()
- FileUploadResource::getBaseRoute in core/
modules/ file/ src/ Plugin/ rest/ resource/ FileUploadResource.php
File
-
core/
modules/ file/ src/ Plugin/ rest/ resource/ FileUploadResource.php, line 260
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.