This is a angular directive that convert image into base 64 encode when uploading