You are here

protected static function FileUpload::generateLockIdFromFileUri in GraphQL 8.4

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 FileUpload::generateLockIdFromFileUri()
FileUpload::saveFileUpload in src/GraphQL/Utility/FileUpload.php
Validates an uploaded file, saves it and returns a file upload response.

File

src/GraphQL/Utility/FileUpload.php, line 489

Class

FileUpload
Service to manage file uploads within GraphQL mutations.

Namespace

Drupal\graphql\GraphQL\Utility

Code

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