Angular directive for upload images with cropping tool in Rails app