POC to copy images through http

POC to copy images through http

On a recent project, the application I'm writing will return to the front end some URL of images that won't be accessible by the front end application.

The most probable solution will be add rules to the front end proxy, so the images will be accessible.

While facing this situation, one idea happened to my mind and I decided to try it.

The idea was to create one Quarkus application who would receive the URL of the image and would access this resource and provide it through one endpoint.

I implemented this in two ways: (1) copying the Response from the URL of the image directly and (2) encoding the Response in base64 and exposing it into a JSON object with the media type.

To proof this idea is possible, I also created one Angular application which receive one URL, access these two Quarkus endpoints and render the image on the screen.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image


This POC is available on my GitHub Project poc-http-copy-images and also in my first post on DEV.to

I hope you like!

要查看或添加评论,请登录

Felipe Henrique Gross Windmoller的更多文章

社区洞察

其他会员也浏览了