public void SaveImageFromBase64(string base64string) { byte[] b = Convert.FromBase64String(base64string); string path = Path.Combine(_env.WebRootPath, "test", "abc.jpg");//实际情况需要根据base64判断文件后缀名 System.IO.File.WriteAllBytes(path, b); }
Powered by: 博客园 Copyright © 2024 火冰·瓶 Powered by .NET 9.0 on Kubernetes