protected static function TemporaryJsonapiFileFieldUploader::generateLockIdFromFileUri in Drupal 9
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php \Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader::generateLockIdFromFileUri()
- 10 core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php \Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader::generateLockIdFromFileUri()
Generates a lock ID based on the file URI.
Parameters
string $file_uri: The file URI.
Return value
string The generated lock ID.
1 call to TemporaryJsonapiFileFieldUploader::generateLockIdFromFileUri()
- TemporaryJsonapiFileFieldUploader::handleFileUploadForField in core/
modules/ jsonapi/ src/ Controller/ TemporaryJsonapiFileFieldUploader.php - Creates and validates a file entity for a file field from a file stream.
File
- core/
modules/ jsonapi/ src/ Controller/ TemporaryJsonapiFileFieldUploader.php, line 477
Class
- TemporaryJsonapiFileFieldUploader
- Reads data from an upload stream and creates a corresponding file entity.
Namespace
Drupal\jsonapi\ControllerCode
protected static function generateLockIdFromFileUri($file_uri) {
return 'file:jsonapi:' . Crypt::hashBase64($file_uri);
}