Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
Description: 

A new Drupal\file\Upload\FileUploadLocationTrait has been added to remove duplication. It gets a file upload location based on field settings which use tokens for directory paths etc.

This replaces duplicate code in:

  • \Drupal\file\Plugin\rest\resource\FileUploadResource::getUploadLocation()
  • \Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader::getUploadLocation()