I'm using the froala editor within my angular application and for that I'm using
I'm uploading images to s3 via froala, and it works.
Now I've a requirement that, before uploading the image I need to make a api call to my server and based on the response I need to decide whether to upload the image or not.
Here I saw an event 'image.beforeUpload' and if we return false from this event then the current action will be cancel and image will not be uploaded.
But in my case I'm making a api call from the event and as it's asynchronous it's not returning any false instantly. So the image is being uploaded instantly. I tried to return promise, but that didn't help.
Can someone tell me ehat will be the best solution in this case?