Using the Kolkov Angular editor in my Angular application, I have successfully created a rich text editor.
Currently, I am looking to upload images from the editor to the server. I already have a function in place that takes a file as an argument and sends it to the server.
uploadImage(file, viewable_type = "Spree::Vendor", viewable_id=null) {
.............
.............
return this.http.post(this.apiV2Url + '/attach_image'+ "?access_token=" + this.accessToken,
file, options).map(this.extractData).catch(this.handleError);
}
In order to pass the image from the editor to the function, I need to provide it with an endpoint URL.
I am seeking guidance on how to create an endpoint API that can be configured with the editor to send the file to the uploadImage function.