Example #1
0
        public ActionResult RemoveProfileImage(string fileName)
        {
            var userId = User.TryGetPrincipal().UserId;

            var folderPath = userId + "/Profile";

            var url = _storage.DeleteImage(folderPath, fileName);

            if (url != null)
            {
                _gate.Dispatch(new DeleteProfileImageCommand(userId, url, folderPath, fileName));
            }

            return(Json("done"));
        }