0

I have used kolkov angular editor in my angular application to create rich text editor.

Now I want to upload the image from it to the server. I also have the function 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);
      }

Now in order to pass the image from editor to the function, I have to give it some endpoint URL.

I want to know how can I create an endpoint API which I can configure with the editor so It can send the file to the uploadImage function.?

Aaqib
  • 59
  • 9

2 Answers2

1

Angular is a front-end javascript framework. You don't create endpoints to handle server processing in Angular.

Norbert Huurnink
  • 1,326
  • 10
  • 18
0

enter image description here

Angular is a front-end javascript framework. You don't create endpoints to handle server processing in Angular.