| | |
| | | { |
| | | Utlis.WriteLine("上传成功:" + imageUrl); |
| | | //1.2如果是自定义图片删除之前的 |
| | | if (!string.IsNullOrEmpty(imageView.ImagePath) && !imageView.ImagePath.Contains("LoginIcon/2.png")) |
| | | if (!imageView.ImagePath.Contains("LoginIcon/2.png")) |
| | | { |
| | | Utlis.WriteLine("删除: " + imageView.ImagePath); |
| | | System.IO.File.Delete(imageView.ImagePath); |
| | | } |
| | | //重命名保存 |
| | | FileUtils.WriteFileByBytes(imageUrl, imageBytes); |
| | | imageView.ImagePath = imageUrl; |
| | | imageView.ImagePath = null; |
| | | imageView.ImageBytes = imageBytes; |
| | | //上传成功 |
| | | Utlis.ShowTip(Language.StringByID(StringId.UploadSuccessfully)); |