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

  1. Install and configure the Cloudinary module.
  2. Create a content type with an Image field and set its storage to Cloudinary.
  3. Upload an image (e.g., test.jpg).
  4. 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

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

grask0 created an issue. See original summary.

grask0’s picture

Assigned: grask0 » Unassigned
Status: Active » Needs review

Hello,

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.

o_timoshchuk’s picture

Assigned: Unassigned » o_timoshchuk
o_timoshchuk’s picture

Assigned: o_timoshchuk » Unassigned
Status: Needs review » Reviewed & tested by the community

I have tested the merge request. All works well for me

anton4uk’s picture

+1 RTBC. It works for me.

deimos’s picture

+1 RTBC.
I tested MR!36 locally, works fine.

  • grask0 committed 72de466c on 3.0.x
    fix: #3570627 Unable to upload image to Cloudinary.
    
grask0’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.