By kim.pepper on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
A new static method for parsing a filename from the content-disposition header for file uploads has been added.
For example:
use Symfony\Component\HttpFoundation\Request;
$filename = ContentDispositionFilenameParser::parseFilename($request)
This deprecates two duplicate methods in REST and JSON API modules:
\Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader::validateAndParseContentDispositionHeader()\Drupal\file\Plugin\rest\resource\FileUploadResource::validateAndParseContentDispositionHeader()
Impacts:
Module developers