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

Duplicated input stream file writing logic from REST and JSON API is deprecated and replaced with a service.

You can now use \Drupal\file\Upload\InputStreamFileWriter::writeStreamToFile() to write the input stream to a temporary file and use the service file.input_stream_file_writer

\Drupal\file\Plugin\rest\resource\FileUploadResource::BYTES_TO_READ and \Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader::BYTES_TO_READ are deprecated and replaced with \Drupal\file\Upload\InputStreamFileWriterInterface::DEFAULT_BYTES_TO_READ

Impacts: 
Module developers