Symfony 4 : Crop and Upload images using CropperJS (AJAX)



Symfony 4 : Crop and Upload images using CropperJS (AJAX)

Symfony 4 : Crop and Upload images using CropperJS (AJAX)

In this Symfony 4 tutorial o cover how you can create a basic system that allows the user to choose a picture, crop it , and send it to the server (Symfony 4) to save it to the system, this video also covers :Setting up the asset manager Symfony Encore to compile all the javascript assets; setting up the image previewing functionality using the File API, Sending ana AJAX request to the server usig axios library, uploading a file (blob) in ajax using the FormData, Generating symfony routes in javascript file using the FosJsRouting bundle, and finally retrieving the file in the server-side as dealing with it as an uploadedFile instance.

A more robust files management system using symfony:
https://www.youtube.com/watch?v=Rwr3GWmYA6A&t=370s

GituHub Repository:
https://github.com/konshensx16/cropperjs-symfony4

Comments are closed.