Problem/Motivation
The CloudinaryStreamWrapper class has a hardcoded default resource type set to AssetType::RAW. When uploading images via the stream wrapper, they are stored in Cloudinary as "Raw" files instead of "Images".
Steps to reproduce
- Install and configure the Cloudinary module.
- Create a content type with an Image field and set its storage to Cloudinary.
- Upload an image (e.g., test.jpg).
- Attempt to view the image on the Drupal site. The generated URL returns a 404 error from the Cloudinary server.
Proposed resolution
Modify CloudinaryStreamWrapper to use AssetType::AUTO instead of the hardcoded AssetType::RAW.
Issue fork cloudinary-3570627
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
Comment #3
grask0 commentedHello,
I have provided a solution that replaces the RAW asset type with AUTO, allowing the system to handle assets automatically and more reliably.
Please review.
Comment #4
o_timoshchuk commentedComment #5
o_timoshchuk commentedI have tested the merge request. All works well for me
Comment #6
anton4uk commented+1 RTBC. It works for me.
Comment #7
deimos commented+1 RTBC.
I tested MR!36 locally, works fine.
Comment #9
grask0 commentedThanks, merged!