How to Insert / Upload image through POST API (published from Mendix).

0
Hi reader, I use Angular as Front end. I have an entity with my fields with System.image as generalization. And I have published that entity as Rest API. Now I want to integrate that to Angular and perform CRUD. Kindly let me know if anyone has done the same or any idea.   Thanks in advance.
asked
2 answers
0

I'm not sure how you should perform this action in Angular, but to test your REST API in Mendix goto your app URL and after the portnumber enter /rest-doc/ and open the API swagger page.

Select the url at the top of the page and copy this.

Open the Postman app and from the file menu select import, in the dialog paste the copied URL.

Now you should be able to test your REST service and upload the image file.

This link might help in implementing the function in Angular: https://stackoverflow.com/questions/36352405/file-upload-with-angular2-to-rest-api

answered
0

Hi Ashish, Hi Corina

 

This should be possible by creating a get Methode in Mendix

https://docs.mendix.com/howto/integration/publish-rest-service/

 

After that you could use the created Location in Angular

https://medium.com/knowledge-pills/how-to-call-rest-api-in-angular-7622955bf0a9

 

Regards,

answered