Problem/Motivation

This is not a bug per se, but something to be improved to allow other modules reuse code (for example to create Cloudinary files as part of a migration process)

createFile() method is duplicated in cloudinary_media_library_widget\Plugin\CloudinaryMedia\CloudinaryFile and cloudinary_media_library_widget\Plugin\CloudinaryMedia\CloudinaryImage plugins, and it has protected visibility, so it can't be reused.

Steps to reproduce

Proposed resolution

Move createFile() method to CloudinaryMediaBase class, which is extended by CloudinaryMedia plugins, and make it public.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork cloudinary-3331582

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

matiasmiranda created an issue. See original summary.

matiasmiranda’s picture

Status: Active » Needs review
StatusFileSize
new10.12 KB

This patch implements the proposed changes

chrissnyder’s picture

Status: Needs review » Reviewed & tested by the community

This patch works. It allowed us to write some custom migration plugins so we can migrate from Drupal 7 files (stored on the file system) to Drupal 9 Cloudinary Image media entities.