thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.72k stars 2.67k forks source link

Is there any way to upload the images to cloudinary or any cloud service #5839

Open zia-khan-dev opened 4 months ago

zia-khan-dev commented 4 months ago

Laravel version

No response

PHP version

No response

Voyager version

No response

Description of problem

Whenever I upload images to cpanel, for some reason I'm updating my site then I've to take care about the images.

Proposed solution

I want to upload it into cloudinary or any other free cloud services so that I've no worries. I don't want to go with observer, because it will be more difficult for me!

Alternatives considered

No response

Additional context

No response

Emerica commented 4 months ago

What images are you referring to? Images uploaded into settings? Images uploaded into models? You easiest solution is probably to change the storage to a cloud provider that supports some form of S3 protocol, then you can update your voyager config to use that storage instead.

zia-khan-dev commented 4 months ago

Yes, images uploaded into models. But I'm using cpanel not aws s3 bucket. So i need to to save it in cloudinary

Emerica commented 4 months ago

https://github.com/carlosocarvalho/laravel-storage-cloudinary ?

Emerica commented 4 months ago

https://github.com/yoelpc4/laravel-cloudinary Seems more recent

zia-khan-dev commented 4 months ago

@Emerica Well I tried of the packages, but it give me error of This driver does not support retrieving URLs. image

I just changed this 'storage' => [ 'disk' => 'cloudinary', ], in voyager and then follow the above readme documentation of each packages.

Emerica commented 4 months ago

https://github.com/xiaomlove/laravel-filesystem-cloudinary Suggestions for this guy with a couple google searches of that error