cloudinary-community / cloudinary-laravel

Laravel SDK for Cloudinary
MIT License
255 stars 71 forks source link

Get video url by public_id returning an empty string #82

Closed ayech0x2 closed 7 months ago

ayech0x2 commented 1 year ago

I'm trying to get a video url using this method:

$url = Cloudinary::getUrl("public_id_goes_here");

When printing the url variable, it always returns "" ( an empty string )

The asset method in Cloudinary\Api\Admin trait is always taking $assetType as an image

When i hardcode it and use video instead of image it works as expected.

How can I get the URL of a video, when the getUrl method doesn't accept any other parameters!

Is this a bug or am I missing something here?

Thank you in advance.

Mdhesari commented 1 year ago

Hello @ayech0x2

I think this is a bug and I've fixed it manually in my codebase

unicodeveloper commented 1 year ago

@ayech0x2 For video links, you need to use $url = Cloudinary::getVideo("public_id_goes_here");

unicodeveloper commented 1 year ago

@Mdhesari just simply use $url = Cloudinary::getVideo("public_id_goes_here"); for videos. No need to fix anything.