protected static function TemporaryJsonapiFileFieldUploader::generateLockIdFromFileUri in JSON:API 8.2
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 src/
Controller/ TemporaryJsonapiFileFieldUploader.php - Creates and validates a file entity for a file field from a file stream.
File
- src/
Controller/ TemporaryJsonapiFileFieldUploader.php, line 496
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);
}