@mathieuProbesys

Account created on 5 April 2023, about 1 year ago
#

Recent comments

Hello,
Thanks for your reviews.
I have applied modifications :

  1. Change description of class and functions
  2. Remove configFactory
  3. Add translatable string
  4. Change the function getImgDatabse to use entityTypeManager
  5. Delete empty lines
  6. Others little modification

For the batch. When you say the code is loading all the nodes to process before running the batch. Do you refer to the loading of the function getInfoImage and the loading of the function getImgDatabase ?

Thank you for your replied.

Hello,
I have applied all review.

Update the hook_help with more information about the module.

Change the Markup::create with :
new FormattableMarkup('<a href="@src" > Display </a>', ['@src' => $data['description']]),

Change variable $mime_type with constant.

I transform the part of code ( Line 328 ) with :

      if (empty($imgTitle)) {
        // If image don't have title.
        // Generate title with nid, parts of the base64 and the current date.
        $new_file = $directory . $node->nid->value . '-' . substr($linkHref, 120, 10) . '-' . $date . '.' . $imgType;
      }
      else {
        // If image already have title.
        // The file get the name of the image title.
        $new_file = $directory . $imgTitle . '.' . $imgType;
      }

I think is more easy to understand with that.

Thanks for your review.

Hello,
I have applied all review.
I have change ClearBase64ImageController and ClearBase64ImageReplaceController to a Form class.

I have change "public://" with :
file_url_transform_relative(file_create_url($new_file)) because FileSystem::realpath() not return valid path.

I have remove data form $header.

Also change :
$db->escapeLike('data:image/', 'base64')
to $db->escapeLike('data:image/')

Hello,
thanks for you review.
I check for the modification.

Production build 0.69.0 2024