Building large scale application is more difficult than many people understand or expect. Join me in this long running series where I set out to duplicate one of the most popular social media platforms ever creating using Java, Spring Boot, Spring Security, PostgreSQL data, React JS web application framework and more.
In this episode we finally wrap up the logic behind being able to crop an image with our image editor, as well as uploading updated profile and banner pictures. We start out in the ImageEditor component where we setup the final pieces of logic to being able to resize our image, as well as calculate where the starting and ending points of the image to be sent to the backend are. After we finish up this logic we head over to the top bar to setup the logic to actually generate the cropped image using the points we calculated and an invisible canvas. Finally, we setup the modal to call the dispatcher to update our edit profile component, as well as hop into the backend to setup the image service to allow us to send over an image as a base64 and store it in our database.