You are here

protected static function FileUploadResource::generateLockIdFromFileUri in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::generateLockIdFromFileUri()
  2. 10 core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::generateLockIdFromFileUri()

Generates a lock ID based on the file URI.

Parameters

$file_uri: The file URI.

Return value

string The generated lock ID.

1 call to FileUploadResource::generateLockIdFromFileUri()
FileUploadResource::post in core/modules/file/src/Plugin/rest/resource/FileUploadResource.php
Creates a file from an endpoint.

File

core/modules/file/src/Plugin/rest/resource/FileUploadResource.php, line 602

Class

FileUploadResource
File upload resource.

Namespace

Drupal\file\Plugin\rest\resource

Code

protected static function generateLockIdFromFileUri($file_uri) {
  return 'file:rest:' . Crypt::hashBase64($file_uri);
}