Nisha Patel
Problem
I use Cloudinary API to upload my files with Stream. The problem is if I upload my image I receive the URL too late. My backend sends back if I stream an empty URL and after 2-3 seconds I get in the console to log my uploaded URL. how can I wait until I have my uploaded URL (secure_url)
Solution
The response from the upload request to Cloudinary hasn't come through by the time you render the JSON response. You could wrap it in a Promise and wait for it to resolve before rendering your response.
Answered by: >Aleksandar
Credit: >StackOverflow
Blog Links:
>How do I customize controller actions in Laravel Jetstream?
>Run Laravel Project to Active Local Server
>How to show encrypted user ID in URL in Laravel?
>How to fix Laravel LiveWire listener?