cloudinary-community / cloudinary-laravel

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

How to get upload image link from widget "x-cld-upload-button" #95

Closed mahmoudelgharabawi closed 6 months ago

mahmoudelgharabawi commented 10 months ago

i try to use ""x-cld-upload-button" But i can't understand How i can get the link after i uploaded image i want the link so as i can store in my model >>> using "php laravel" i need more details or example to know how to use this ....

sccalabr commented 7 months ago

Id like to give this a try. Do you have a code pointer to what he was talking about in the issue?

unicodeveloper commented 7 months ago

@sccalabr Are you still interested in this?

The x-cld-upload-button calls the JavaScript widget that opens up the modal and then the file is uploaded to Cloudinary.

This is the code https://github.com/cloudinary-devs/cloudinary-laravel/blob/master/resources/views/components/button.blade.php

unicodeveloper commented 7 months ago

So we need a way to pass the link back to PHP and make it accessible for it to be stored anywhere.

Delaney commented 7 months ago

Hey @unicodeveloper added this functionality. My implementation works fine, but I'm wondering if there's a cleaner way to go about it.