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
Comments
Comment #3
matiasmirandaThis patch implements the proposed changes
Comment #4
chrissnyderThis 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.