I am trying to save a base64 image to my directory here is the code. Actually, I am getting the file in my directory but when I open it displays a format error