diff --git a/GDZZ.Application/Service/Auth/AuthService.cs b/GDZZ.Application/Service/Auth/AuthService.cs index ab8e5ae..47bf56c 100644 --- a/GDZZ.Application/Service/Auth/AuthService.cs +++ b/GDZZ.Application/Service/Auth/AuthService.cs @@ -515,21 +515,22 @@ namespace GDZZ.Application.Service.Auth var fileName = Path.Combine("/"+ UserManager.UserId +".png"); if (!Directory.Exists(_options.QRCode.path)) Directory.CreateDirectory(_options.QRCode.path); - Console.WriteLine(_options.QRCode.path + fileName); + var Imageurl = _options.QRCode.path + fileName; + Console.WriteLine(Imageurl); try { MemoryStream ms = new MemoryStream(res); - FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate); + FileStream fs = new FileStream(Imageurl, FileMode.OpenOrCreate); ms.WriteTo(fs); ms.Close(); fs.Close(); - await this.cacheService.SetQRCodeAsync(UserManager.UserId, fileName); + await this.cacheService.SetQRCodeAsync(UserManager.UserId, Imageurl); } catch (Exception e) { throw Oops.Oh(e.Message); } - return fileName; + return Imageurl; }